I have been trying to create a derivation for IUP, a portable user interface written for C. As this is the first one that I have tried, I am having a lot of trouble getting it correct and even though I seem to be following the manuals, it still fails. I am obviously doing something wrong but cannot see what and was hoping for some pointers so that I can get this one moving. I am running Nix 2.3.6 under Debian testing/bullseye, kernel 5.7.6. I have tried the derivation two ways and they fail both times and with different error messages. My first attempt was to do:
with ( import {} );
stdenv.mkDerivation rec
{
name = “iup”; # Name of the derivation
imports =
[
../common/local-settings.nix # Include NIX local settings file
];
buildInputs =
[
coreutils-full # Full set of core utilities
fftw # Fast fourier transform library
freetype # A font rendering engine
glib # C library of building blocks
gnumake # Make software building tools
gtk3 # GTK for C version 3
gtkmm3 # GTK for C++ version 3
harfbuzz # Open Type text shaping engine
libGL # GL library and header files
libGLU # GLU library and header files
pkg-config # Package configuration for code
webkitgtk # Web kit 2 libraries and headers
];
builder = “${bash}/bin/bash”; # Using BASH as our builder
args =
[
./builder.sh
“force” # Force full code fetch from SVN
“nixos” # Ensure we use script via NIX
];
meta =
{
description = “A portable user interface written for the C language.”;
longDescription =
''
A portable user interface written for the C language. It provides
image handling, canvases and GUI functionality. It runs on Linux,
Mac and Windows.
'';
maintainers = [ "xxxxx" ];
};
}
and when you do ‘nix-build’ it fails with:
these derivations will be built:
/nix/store/k2h9pwyimmfqff21hrq22czl1pda3vl8-iup.drv
building ‘/nix/store/k2h9pwyimmfqff21hrq22czl1pda3vl8-iup.drv’…
bash: /nix/store/rbh0is244rwvcv9a918bvmmky9i1isyk-builder.sh: No such file or directory
builder for ‘/nix/store/k2h9pwyimmfqff21hrq22czl1pda3vl8-iup.drv’ failed with exit code 127
error: build of ‘/nix/store/k2h9pwyimmfqff21hrq22czl1pda3vl8-iup.drv’ failed
When I change the derivation to the following:
with ( import {} );
stdenv.mkDerivation rec
{
name = “iup”; # Name of the derivation
imports =
[
../common/local-settings.nix # Include NIX local settings file
];
buildInputs =
[
coreutils-full # Full set of core utilities
fftw # Fast fourier transform library
freetype # A font rendering engine
glib # C library of building blocks
gnumake # Make software building tools
gtk3 # GTK for C version 3
gtkmm3 # GTK for C++ version 3
harfbuzz # Open Type text shaping engine
libGL # GL library and header files
libGLU # GLU library and header files
pkg-config # Package configuration for code
webkitgtk # Web kit 2 libraries and headers
];
builder = ./builder.sh; # Using our own custom builder
args =
[
“force” # Force full code fetch from SVN
“nixos” # Ensure we use script via NIX
];
meta =
{
description = “A portable user interface written for the C language.”;
longDescription =
''
A portable user interface written for the C language. It provides
image handling, canvases and GUI functionality. It runs on Linux,
Mac and Windows.
'';
maintainers = [ "xxxxxx" ];
};
}
it fails with:
these derivations will be built:
/nix/store/8nrds7wpg6r69bqqw6king5p5c07iqij-iup.drv
building ‘/nix/store/8nrds7wpg6r69bqqw6king5p5c07iqij-iup.drv’…
bash: force: No such file or directory
builder for ‘/nix/store/8nrds7wpg6r69bqqw6king5p5c07iqij-iup.drv’ failed with exit code 127
error: build of ‘/nix/store/8nrds7wpg6r69bqqw6king5p5c07iqij-iup.drv’ failed
I am completely stuck at the moment as until I can get IUP built, then I cannot move onto my C and C++ applications and write derivations for them. Any help that can be offered will be much appreciated,