I’m trying to package Urbackup but i cant run bash scripts in the derivation. Not even simple ones like the teste.sh that i created to test and that just run echo ‘test!’.
The error message i get is ./teste.sh: cannot execute: required file not found
.
The following is my nix expression:
with import <nixpkgs> {};
stdenv.mkDerivation rec {
pname = "urbackup-server";
version = "2.5.20";
src = fetchgit {
url = "https://github.com/uroni/urbackup_backend.git";
rev = "refs/tags/${version}";
sha256 = "sha256-brP7nYikbIvQP/K+qSKyd8eHWUIK9Ai/4qP09ptr+lE=";
};
buildInputs = [
cryptopp
curlWithGnuTls
];
configurePhase = ''
runHook preInstall
touch teste.sh
echo '#!/usr/bin/env bash' >> teste.sh
echo 'echo 'echo test! >> teste.sh
chmod +x teste.sh
./teste.sh
./switch_build.sh server
autoreconf --install
./configure
runHook postInstall
'';
buildFlags = [
"-j8"
];
enableParallelBuilding = true;
meta = with lib; {
description = "Easy to setup Open Source client/server backup system";
longDescription = "An easy to setup Open Source client/server backup system, that through a combination of image and file backups accomplishes both data safety and a fast restoration time";
homepage = "https://www.urbackup.org/index.html";
license = licenses.agpl3Plus;
platforms = platforms.linux;
};
}
I’m running nix inside Debian Trixie:
$ nix --version
nix (Nix) 2.25.2
I can access the files normally with ls
cat
.