isle/nix/pkgs.nix
Brian Picciano b35a3d6574 First public commit
There has been over 1 year of commit history leading up to this point,
but almost all of that has had some kind network configuration or
secrets built into the code. As of today all of that has been removed,
and the codebase can finally be published!

I am keeping a private copy of the previous commit history, though it's
unclear if it will ever be able to be published.
2022-07-04 15:18:55 -06:00

79 lines
2.1 KiB
Nix

rec {
overlays = [
(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
buildGoModule = args: prev.buildGoModule ({
doCheck = false;
CGO_ENABLED=0;
tags = [ "netgo" "timetzdata" ];
ldflags = [ "-w" "-extldflags=-static" ];
} // args);
})
(final: prev: {
yq-go = prev.buildGoModule rec {
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 {
name = "nixpkgs-21-05";
url = "https://github.com/NixOS/nixpkgs/archive/7e9b0dff974c89e070da1ad85713ff3c20b0ca97.tar.gz";
sha256 = "1ckzhh24mgz6jd1xhfgx0i9mijk6xjqxwsshnvq789xsavrmsc36";
};
stable = import stableSrc { inherit overlays; };
}