forked from lxc/incus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request lxc#1526 from MadnessASAP/nix-shell
Add shell.nix
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
]; | ||
} |