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];
|
# 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 {
|
rustComponents = naersk-lib.buildPackage {
|
||||||
pname = "yama";
|
pname = "yama";
|
||||||
root = ./.;
|
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; [
|
buildInputs = with pkgs; [
|
||||||
openssl
|
openssl
|
||||||
pkgconfig
|
pkgconfig
|
||||||
@ -71,7 +85,7 @@
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
# set -eu
|
# set -eu
|
||||||
mkdir $out $out/bin
|
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 ${mysqlHelper}/bin/datman-helper-mysql-{backup,restore} $out/bin
|
||||||
ln -s ${postgresHelper}/bin/datman-helper-postgres-{backup,restore} $out/bin
|
ln -s ${postgresHelper}/bin/datman-helper-postgres-{backup,restore} $out/bin
|
||||||
ln -s ${pkgs.lz4}/bin/lz4 $out/bin/
|
ln -s ${pkgs.lz4}/bin/lz4 $out/bin/
|
||||||
@ -82,8 +96,10 @@
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# set -eu
|
# 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
|
wrapProgram $fn --suffix PATH : $out/bin
|
||||||
|
mv "$out/bin/$fnbase" "$out/bin/7$fnbase"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user