-
Notifications
You must be signed in to change notification settings - Fork 134
/
flake.nix
44 lines (34 loc) · 1.15 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
44
{
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";
meta.mainProgram = "paisa";
version = "0.7.1";
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
'';
};
});
}