-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathflake.nix
More file actions
39 lines (34 loc) · 1.03 KB
/
flake.nix
File metadata and controls
39 lines (34 loc) · 1.03 KB
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
{
description = "A battery-included, POSIX-compatible, generative shell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { nixpkgs, ... }:
let
version = "1.10.3"; # x-release-please-version
forAllSystems = f:
nixpkgs.lib.genAttrs
[ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]
(hostSystem: f nixpkgs.legacyPackages.${hostSystem});
in {
packages = forAllSystems (pkgs: {
default = pkgs.buildGoModule {
pname = "gsh";
inherit version;
src = ./.;
# Run `nix build` with lib.fakeHash to get the correct hash
vendorHash = "sha256-Ov9D1D7lrS2JmreSJlxwVVsWCdQK0qoun9aCYXwYvL4=";
subPackages = [ "cmd/gsh" ];
ldflags = [
"-X main.BUILD_VERSION=${version}"
];
nativeBuildInputs = with pkgs; [
which
];
# Skip tests that require network access or violate
# the filesystem sandboxing.
doCheck = false;
};
});
};
}