forked from ananthakumaran/paisa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
37 lines (28 loc) · 961 Bytes
/
flake.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
35
36
37
{
description = "paisa";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
nodeDependencies = (pkgs.callPackage ./flake/override.nix {
nodejs = pkgs.nodejs-18_x;
}).nodeDependencies;
in {
devShells.default = import ./shell.nix { inherit pkgs; };
packages.default = pkgs.buildGoModule {
pname = "paisa-cli";
version = "0.6.2";
src = ./.;
nativeBuildInputs = [ pkgs.nodejs-18_x ];
vendorHash = "sha256-9VM6+0h6DMtlA+RvCfpDffAvaq7jRmBVVFTbdUfYwsA=";
CGO_ENABLED = 1;
doCheck = false;
subPackages = [ "." ];
preConfigure = ''
ln -s ${nodeDependencies}/lib/node_modules ./node_modules
export PATH="${nodeDependencies}/.bin:$PATH"
npm run build
'';
};
});
}