60 lines
1.5 KiB
Nix
60 lines
1.5 KiB
Nix
{ stdenvNoCC,
|
|
lib,
|
|
fetchFromGitHub,
|
|
zip,
|
|
nix-update-script, }:
|
|
let
|
|
makeShaderPackage = {
|
|
name,
|
|
src,
|
|
branch ? null,
|
|
}: stdenvNoCC.mkDerivation {
|
|
pname = name;
|
|
inherit src;
|
|
version = src.rev;
|
|
phases = [ "installPhase" ];
|
|
buildInputs = [ zip ];
|
|
installPhase = ''
|
|
cd "$src"
|
|
mkdir -p "$out"
|
|
zip -r "$out/${name}.zip" .
|
|
'';
|
|
passthru.updateScript = nix-update-script {
|
|
# this doesn't work for some reason; don't use --use-update-script for now
|
|
extraArgs = lib.optional (!(builtins.isNull branch)) "--version=branch=${branch}";
|
|
};
|
|
};
|
|
in
|
|
{
|
|
bliss-dh = makeShaderPackage {
|
|
name = "Bliss-DH";
|
|
branch = "main";
|
|
src = fetchFromGitHub {
|
|
owner = "X0nk";
|
|
repo = "Bliss-Shader";
|
|
rev = "1cd49fe249db4cfeb102283fdc068e9cc1549e3e";
|
|
hash = "sha256-0R+aebM2Cztkdj4020CUTr9ABwFyG9nEu7Op0K9k6+w=";
|
|
};
|
|
};
|
|
|
|
complementary-reimagined-dh = makeShaderPackage {
|
|
name = "ComplementaryReimagined-DH";
|
|
src = fetchFromGitHub {
|
|
owner = "Steveplays28";
|
|
repo = "ComplementaryReimagined";
|
|
rev = "c5cb31757c27550ae30b9c462fe3ed1993b39d9d";
|
|
hash = "sha256-1HOscJ8afNC7t4yiobJBJgom7pDpwZPdA3B3EILlyWY=";
|
|
};
|
|
};
|
|
|
|
rethinking-voxels-dh = makeShaderPackage {
|
|
name = "RethinkingVoxels-DH";
|
|
src = fetchFromGitHub {
|
|
owner = "Steveplays28";
|
|
repo = "ComplementaryReimagined";
|
|
rev = "343915b7b18e1d83187fae1ea1f14eac90d4d09d";
|
|
hash = "sha256-Hu+JeINQC09OS1WY1kpagoRH5Awnp4YhacWusQgRsqc=";
|
|
};
|
|
};
|
|
}
|