12 pname = "duckstation";
14 src = fetchFromGitHub {
17 rev = "refs/tags/v${self.version}";
19 # Some files are filled by using Git commands; it requires deepClone.
20 # More info at `checkout_ref` function in nix-prefetch-git.
21 # However, `.git` is a bit nondeterministic (and Git itself makes no
22 # guarrantees whatsoever).
23 # Then, in order to enhance reproducibility, what we will do here is:
25 # - Execute the desired Git commands;
26 # - Save the obtained info into files;
27 # - Remove `.git` afterwards.
32 mkdir -p .nixpkgs-auxfiles/
33 git rev-parse HEAD > .nixpkgs-auxfiles/git_hash
34 git rev-parse --abbrev-ref HEAD | tr -d '\r\n' > .nixpkgs-auxfiles/git_branch
35 git describe --dirty | tr -d '\r\n' > .nixpkgs-auxfiles/git_tag
36 git log -1 --date=iso8601-strict --format=%cd > .nixpkgs-auxfiles/git_date
37 find $out -name .git -print0 | xargs -0 rm -fr
39 hash = "sha256-HETo7mChBASnr5prPUWcOhS4TIESFdrs1haEXQpnuzs=";
45 shaderc-patched = shaderc.overrideAttrs (old: let
47 src = fetchFromGitHub {
51 hash = "sha256-Cwp7WbaKWw/wL9m70wfYu47xoUGQW+QGeoYhbyyzstQ=";
55 pname = "shaderc-patched-for-duckstation";
57 patches = (old.patches or [ ]) ++ [
59 url = "file://${duckstation.src}/scripts/shaderc-changes.patch";
60 hash = "sha256-Ps/D+CdSbjVWg3ZGOEcgbpQbCNkI5Nuizm4E5qiM9Wo=";
64 "libshaderc/CMakeLists.txt"