-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
48 lines (43 loc) · 1.16 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
45
46
47
48
{
description = "lcp-decrypt";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
(self: prevPkgs: {
tinygo = prevPkgs.callPackage ./tinygo.nix {};
})
];
pkgs = import nixpkgs {
inherit system overlays;
};
rev = if (self ? shortRev) then self.shortRev else "dev";
in
with pkgs;
{
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.biome
pkgs.go
pkgs.gopls
pkgs.tinygo
];
GOTOOLCHAIN = "local";
shellHook = ''
export GOPATH="$(realpath .)/.go";
export PATH="''\${GOPATH}/bin:''\${PATH}"
'';
};
packages.default = pkgs.buildGo122Module {
pname = "lcp-decrypt";
version = rev;
src = pkgs.lib.cleanSource self;
vendorHash = "sha256-ouRj0Rav6Og/2lVk6sk/O37xlQJd3fLwPoKlEgb/7ik=";
};
}
);
}