Fix flake and add 7-prefix so we can use it alongside the stable version
ci/woodpecker/push/build Pipeline failed Details
ci/woodpecker/push/release Pipeline was successful Details

This commit is contained in:
Olivier 'reivilibre' 2023-05-20 14:16:13 +01:00
parent 3a2ece31b6
commit a47924dc80
1 changed files with 19 additions and 3 deletions

View File

@ -38,12 +38,26 @@
# paths = [fenixRustToolchain.rustc fenixRustToolchain.cargo fenixRustToolchain.clippy fenixRustToolchain.rustfmt fenixRustToolchain.rustPlatform.rustcSrc];
# };
naersk-lib = naersk.lib."${system}";
#naersk-lib = naersk.lib."${system}";
naersk-lib = pkgs.callPackage naersk {
cargo = fenixRustToolchain;
rustc = fenixRustToolchain;
};
rustComponents = naersk-lib.buildPackage {
pname = "yama";
root = ./.;
overrideMain = attrs: {
# Set up the dev database, needed for compile-time query checking.
preConfigure = ''
export PATH="${pkgs.sqlx-cli}/bin:$PATH"
pushd yama_localcache
bash dev_db.sh
popd
'';
};
buildInputs = with pkgs; [
openssl
pkgconfig
@ -71,7 +85,7 @@
installPhase = ''
# set -eu
mkdir $out $out/bin
ln -s ${rustComponents}/bin/{yama,datman} $out/bin
ln -s ${rustComponents}/bin/{yama,datman,yamascan} $out/bin
ln -s ${mysqlHelper}/bin/datman-helper-mysql-{backup,restore} $out/bin
ln -s ${postgresHelper}/bin/datman-helper-postgres-{backup,restore} $out/bin
ln -s ${pkgs.lz4}/bin/lz4 $out/bin/
@ -82,8 +96,10 @@
postInstall = ''
# set -eu
for fn in $out/bin/{datman,yama,datman-helper-{mysql,postgres}-{backup,restore}}; do
for fnbase in {datman,yama,yamascan,datman-helper-{mysql,postgres}-{backup,restore}}; do
fn="$out/bin/$fnbase"
wrapProgram $fn --suffix PATH : $out/bin
mv "$out/bin/$fnbase" "$out/bin/7$fnbase"
done
'';
};