Fix flake and add 7-prefix so we can use it alongside the stable version
This commit is contained in:
parent
3a2ece31b6
commit
a47924dc80
22
flake.nix
22
flake.nix
|
@ -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
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue