forked from ananthakumaran/paisa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
43 lines (33 loc) · 1.11 KB
/
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
38
39
40
41
42
43
{
description = "paisa";
inputs.mkdocs-pkgs.url = "github:NixOS/nixpkgs/staging-next";
outputs = { self, nixpkgs, flake-utils, mkdocs-pkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
mkdocs = mkdocs-pkgs.legacyPackages.${system};
nodeDependencies = (pkgs.callPackage ./flake/override.nix {
nodejs = pkgs.nodejs-18_x;
}).nodeDependencies;
in {
devShells.default = import ./shell.nix {
inherit pkgs;
inherit mkdocs;
};
packages.default = pkgs.buildGoModule {
pname = "paisa-cli";
version = "0.6.6";
src = ./.;
nativeBuildInputs = [ pkgs.nodejs-18_x ];
vendorHash = "sha256-KnHJ6+aMahTeNdbRcRAgBERGVYen/tM/tDcFI/NyLdE=";
CGO_ENABLED = 1;
doCheck = false;
subPackages = [ "." ];
preConfigure = ''
ln -s ${nodeDependencies}/lib/node_modules ./node_modules
export PATH="${nodeDependencies}/.bin:$PATH"
npm run build
'';
};
});
}