Skip to content

Commit f579dd3

Browse files
committed
add shell.nix
Add a simple shell.nix for those using NixOS and/or nixpkgs. Signed-off-by: Michael 'ASAP' Weinrich <[email protected]>
1 parent 411dc2a commit f579dd3

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

shell.nix

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
let
2+
pkgs = import <nixpkgs> { inherit overlays; };
3+
_xgettext-go =
4+
{ buildGoModule
5+
, fetchFromGitHub
6+
, gettext
7+
}: buildGoModule rec {
8+
pname = "xgettext-go";
9+
version = "2.57.1";
10+
11+
src = fetchFromGitHub {
12+
owner = "canonical";
13+
repo = "snapd";
14+
rev = version;
15+
hash = "sha256-icPEvK8jHuJO38q1n4sabWvdgt9tB5b5Lh5/QYjRBBQ=";
16+
};
17+
18+
vendorHash = "sha256-e1QFZIleBVyNB0iPecfrPOg829EYD7d3KMHIrOYnA74=";
19+
subPackages = [
20+
"i18n/xgettext-go"
21+
];
22+
};
23+
overlays = [
24+
(final: prev: {
25+
xgettext-go = final.callPackage _xgettext-go { };
26+
})
27+
];
28+
29+
in
30+
pkgs.mkShell {
31+
packages = with pkgs; [
32+
# dev environment
33+
go
34+
golangci-lint
35+
gopls
36+
37+
# static-analysis
38+
debianutils
39+
go-licenses
40+
go-swagger
41+
gettext
42+
shellcheck
43+
xgettext-go
44+
(python3.withPackages (pyPkgs: with pyPkgs; [
45+
flake8
46+
]))
47+
];
48+
inputsFrom = [
49+
pkgs.incus
50+
];
51+
}

0 commit comments

Comments
 (0)