Skip to content

Commit

Permalink
Merge pull request lxc#1526 from MadnessASAP/nix-shell
Browse files Browse the repository at this point in the history
Add shell.nix
  • Loading branch information
stgraber authored Dec 18, 2024
2 parents 6247aa7 + 12e350a commit 57c9042
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
let
pkgs = import <nixpkgs> { inherit overlays; };
_xgettext-go =
{ buildGoModule
, fetchFromGitHub
, gettext
}: buildGoModule rec {
pname = "xgettext-go";
version = "2.57.1";

src = fetchFromGitHub {
owner = "canonical";
repo = "snapd";
rev = version;
hash = "sha256-icPEvK8jHuJO38q1n4sabWvdgt9tB5b5Lh5/QYjRBBQ=";
};

vendorHash = "sha256-e1QFZIleBVyNB0iPecfrPOg829EYD7d3KMHIrOYnA74=";
subPackages = [
"i18n/xgettext-go"
];
};
overlays = [
(final: prev: {
xgettext-go = final.callPackage _xgettext-go { };
})
];

in
pkgs.mkShell {
packages = with pkgs; [
# dev environment
go
golangci-lint
gopls

# static-analysis
debianutils
go-licenses
go-swagger
gettext
shellcheck
xgettext-go
(python3.withPackages (pyPkgs: with pyPkgs; [
flake8
]))
];
inputsFrom = [
pkgs.incus
];
}

0 comments on commit 57c9042

Please sign in to comment.