package replicate's cog

master
Yorick van Pelt 2023-09-23 15:53:36 +02:00
parent 492739eca9
commit 332bee9638
Signed by: yorick
GPG Key ID: D8D3CC6D951384DE
3 changed files with 18 additions and 0 deletions

View File

@ -287,6 +287,7 @@ in {
# work
timesync
r8-cog
]);

View File

@ -43,6 +43,7 @@ in
judith = {
isNormalUser = true;
openssh.authorizedKeys.keys = sshkeys.judith;
packages = with pkgs; [ r8-cog ];
# packages = with pkgs; [
# git cmake gnumake gcc python3 python3.pkgs.pip screen vim
# ];

View File

@ -71,5 +71,21 @@
inherit (self.nix-npm-buildpackage) buildYarnPackage;
electron_26 = self.electron_27;
};
r8-cog = self.stdenvNoCC.mkDerivation rec {
pname = "cog";
version = "0.8.6";
src = self.fetchurl {
url = "https://github.com/replicate/cog/releases/download/v${version}/cog_linux_x86_64";
hash = "sha256-Ng62tbRmlrL23JRdP3Zt4nT8JfLrHThF0mmMf1jee7g=";
};
dontUnpack = true;
installPhase = ''
install -Dm 755 $src $out/bin/cog
mkdir -p $out/share/{fish/vendor_completions.d,bash-completion/completions,zsh/site-functions}
$out/bin/cog completion bash > $out/share/bash-completion/completions/cog
$out/bin/cog completion fish > $out/share/fish/vendor_completions.d/cog.fish
$out/bin/cog completion zsh > $out/share/zsh/site-functions/_cog
'';
};
})