-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.nix
34 lines (33 loc) · 897 Bytes
/
package.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ pkgs }:
with pkgs;
let
cargo_nix = import ./Cargo.nix { inherit pkgs;
buildRustCrateForPkgs = pkgs: pkgs.buildRustCrate.override {
rustc = pkgs.rust-bin.stable.latest.default;
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
sqlx-macros = attrs: {
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
};
backend = attrs: {
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
};
};
};
};
crate = cargo_nix.rootCrate.build;
in
stdenv.mkDerivation {
pname = "vf-graphql-sqlite-backend";
version = "0.0.1";
src = ./.;
dontUnpack = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/{bin,migrations,seeds}
cp ${crate}/bin/backend $out/bin
cp -r $src/migrations $out
cp -r $src/seeds $out
'';
dontCheck = true;
dontFixup = true;
}