I’m trying to track down a problem with digikam (see Digikam crashing on right-click after upgrade). I’d like to build the package locally for troubleshooting (and to try to upgrade to version 8.2.0).
I’ve created a directory and copied the default.nix from git, but when I run nix-build, I get:
Nix attempted to evaluate a function as a top level expression; in
this case it must have its arguments supplied either by default
values, or passed explicitly with '--arg' or '--argstr'. See
https://nixos.org/manual/nix/stable/language/constructs.html#functions.
at /home/mike/src/digikam/default.nix:1:43:
1| { mkDerivation, config, lib, fetchpatch, fetchurl, cmake, doxygen, extra-cmake-modules, wrapGAppsHook
| ^
2|```
hmm. I’m building it with a locally cloned nixpkgs since I’m on a flakes setup. Perhaps there’s a mismatch with your channels and packages? I just tried this morning and it builds fine:
nix-build -I nixpkgs=/home/rjpc/git/nixpkgs blah blah
rjpc /tmp/junk/result/bin % ./digikam --help
Usage: ./digikam [options]
Professional Photo Management with the Power of Open Source - A KDE Family Project
Options:
-h, --help Displays help on commandline options.
--help-all Displays help including Qt specific options.
-v, --version Displays version information.
Might be worth showing us output of nix-shell -p nix-info --run "nix-info -m"
I’m also gonna ping @TLATER since they might be able to help?
- system: `"x86_64-linux"`
- host os: `Linux 6.1.68, NixOS, 23.11 (Tapir), 23.11.20231220.d65bcea`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.1`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos````
I'm also using flakes. I'm taking my system from 23.11, but using "unstable" for my user packages.
I’ve cloned the repo, but am not sure what to do next. Do I need to build everything? What directory should I be in, and what command do I run–i.e., what should I replace blah blah with in your command: nix-build -I nixpkgs=/home/rjpc/git/nixpkgs blah blah?
the above should also work along with the commands @TLATER wrote. I’m running this right now and my CPU is getting hot
edit: built successfully! I hope it works for you also.
It builds, and the executable exhibits the problem I’m trying to troubleshoot. How can I get it to build with debug symbols, so I can use gdb to figure out what’s going on?