Move each overlay into its own file
This commit is contained in:
parent
f6a59961bd
commit
1c3fa3341e
25
nix/nebula.nix
Normal file
25
nix/nebula.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
buildGoModule,
|
||||||
|
fetchFromGitHub,
|
||||||
|
|
||||||
|
}: buildGoModule rec {
|
||||||
|
|
||||||
|
pname = "nebula";
|
||||||
|
|
||||||
|
# If this changes, remember to change:
|
||||||
|
# - the AppDir/etc/daemon.yml vpn.firewall docs
|
||||||
|
# - the version imported in go-workspace
|
||||||
|
version = "1.4.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "slackhq";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "lu2/rSB9cFD7VUiK+niuqCX9CI2x+k4Pi+U5yksETSU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorSha256 = "p1inJ9+NAb2d81cn+y+ofhxFz9ObUiLgj+9cACa6Jqg=";
|
||||||
|
|
||||||
|
subPackages = [ "cmd/nebula" "cmd/nebula-cert" ];
|
||||||
|
}
|
55
nix/pkgs.nix
55
nix/pkgs.nix
@ -4,19 +4,6 @@ rec {
|
|||||||
|
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
|
|
||||||
# rebase is a helper which takes all files/dirs under oldroot, and
|
|
||||||
# creates a new derivation with those files/dirs copied under newroot
|
|
||||||
# (where newroot is a relative path to the root of the derivation).
|
|
||||||
rebase = name: oldroot: newroot: prev.stdenv.mkDerivation {
|
|
||||||
name = name;
|
|
||||||
inherit oldroot newroot;
|
|
||||||
builder = builtins.toFile "builder.sh" ''
|
|
||||||
source $stdenv/setup
|
|
||||||
mkdir -p "$out"/"$newroot"
|
|
||||||
cp -rL "$oldroot"/* "$out"/"$newroot"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# make buildGoModule default to static compilation
|
# make buildGoModule default to static compilation
|
||||||
buildGoModule = args: prev.buildGoModule ({
|
buildGoModule = args: prev.buildGoModule ({
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
@ -27,45 +14,9 @@ rec {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
(final: prev: {
|
(final: prev: { rebase = prev.callPackage ./rebase.nix {}; })
|
||||||
|
(final: prev: { yq-go = prev.callPackage ./yq-go.nix {}; })
|
||||||
yq-go = prev.buildGoModule rec {
|
(final: prev: { nebula = prev.callPackage ./nebula.nix {}; })
|
||||||
|
|
||||||
pname = "yq-go";
|
|
||||||
version = "4.21.1";
|
|
||||||
|
|
||||||
src = prev.fetchFromGitHub {
|
|
||||||
owner = "mikefarah";
|
|
||||||
repo = "yq";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "sha256-283xe7FVHYSsRl4cZD7WDzIW1gqNAFsNrWYJkthZheU=";
|
|
||||||
};
|
|
||||||
|
|
||||||
vendorSha256 = "sha256-F11FnDYJ59aKrdRXDPpKlhX52yQXdaN1sblSkVI2j9w=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nebula = prev.buildGoModule rec {
|
|
||||||
pname = "nebula";
|
|
||||||
|
|
||||||
# If this changes, remember to change:
|
|
||||||
# - the AppDir/etc/daemon.yml vpn.firewall docs
|
|
||||||
# - the version imported in go-workspace
|
|
||||||
version = "1.4.0";
|
|
||||||
|
|
||||||
src = prev.fetchFromGitHub {
|
|
||||||
owner = "slackhq";
|
|
||||||
repo = pname;
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "lu2/rSB9cFD7VUiK+niuqCX9CI2x+k4Pi+U5yksETSU=";
|
|
||||||
};
|
|
||||||
|
|
||||||
vendorSha256 = "p1inJ9+NAb2d81cn+y+ofhxFz9ObUiLgj+9cACa6Jqg=";
|
|
||||||
|
|
||||||
subPackages = [ "cmd/nebula" "cmd/nebula-cert" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
stableSrc = fetchTarball {
|
stableSrc = fetchTarball {
|
||||||
|
18
nix/rebase.nix
Normal file
18
nix/rebase.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# rebase is a helper which takes all files/dirs under oldroot, and
|
||||||
|
# creates a new derivation with those files/dirs copied under newroot
|
||||||
|
# (where newroot is a relative path to the root of the derivation).
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
stdenv,
|
||||||
|
|
||||||
|
}: name: oldroot: newroot: stdenv.mkDerivation {
|
||||||
|
|
||||||
|
inherit name oldroot newroot;
|
||||||
|
|
||||||
|
builder = builtins.toFile "builder.sh" ''
|
||||||
|
source $stdenv/setup
|
||||||
|
mkdir -p "$out"/"$newroot"
|
||||||
|
cp -rL "$oldroot"/* "$out"/"$newroot"
|
||||||
|
'';
|
||||||
|
}
|
19
nix/yq-go.nix
Normal file
19
nix/yq-go.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
buildGoModule,
|
||||||
|
fetchFromGitHub,
|
||||||
|
|
||||||
|
}: buildGoModule rec {
|
||||||
|
|
||||||
|
pname = "yq-go";
|
||||||
|
version = "4.21.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "mikefarah";
|
||||||
|
repo = "yq";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-283xe7FVHYSsRl4cZD7WDzIW1gqNAFsNrWYJkthZheU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorSha256 = "sha256-F11FnDYJ59aKrdRXDPpKlhX52yQXdaN1sblSkVI2j9w=";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user