pkgs/d2: add unstable version

This commit is contained in:
Dmitriy Pleshevskiy 2022-11-30 14:47:18 +03:00
parent 50bb6b14a5
commit e3555cf2cb
Signed by: pleshevskiy
GPG Key ID: 1B59187B161C0215
2 changed files with 34 additions and 1 deletions

View File

@ -13,7 +13,7 @@
final: prev:
final.setAttrByPath [ name ] (mkPackage name prev);
allPackageNames = [ "d2" ];
allPackageNames = [ "d2" "d2_unstable" ];
mkAllPackages = pkgs':
listToAttrs
(map

33
pkgs/d2_unstable.nix Normal file
View File

@ -0,0 +1,33 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2022-11-30"; in
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "e6c7d066164040098d294c00779a2248c402c864";
sha256 = "sha256-Qlm5i7l4/ZdVulXVOyry3cwZp7bIDbCXUZ5PngpD9bM=";
};
vendorSha256 = "sha256-yNaocc1iaOHlLqDLql+3XWL9j0RoxBXSWATi7QCNgJI=";
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = "installManPage ci/release/template/man/d2.1";
subPackages = [ "cmd/d2" ];
}