Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
47 lines
955 B
Nix
47 lines
955 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitea,
|
|
nix-update-script,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "colstr";
|
|
version = "1.0.0";
|
|
|
|
src = fetchFromGitea {
|
|
domain = "git.sleeping.town";
|
|
owner = "wonder";
|
|
repo = "colstr";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-0V2S/yYu5L7qxkT4Zf18x9+cHoPMztFmgSywpxF8QqA=";
|
|
};
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
eval ${stdenv.cc.targetPrefix}c++ main.cpp
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 a.out $out/bin/colstr
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = with lib; {
|
|
description = "Deterministically output each input argument in a color assigned to it";
|
|
homepage = "https://git.sleeping.town/wonder/colstr";
|
|
license = with licenses; [ cc0 ];
|
|
maintainers = with maintainers; [ annaaurora ];
|
|
mainProgram = "colstr";
|
|
platforms = platforms.all;
|
|
};
|
|
})
|