aboutsummaryrefslogtreecommitdiff
path: root/flakes/mypackages/overlays/morph/default.nix
blob: b316d70819a57635806653da9713a2eb5f7518a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
self: super: {
  morph = super.morph.overrideAttrs(old: rec {
    version = "1.6.0-30-g5b85237";
    src = self.fetchFromGitHub {
      owner = "dbcdk";
      repo = "morph";
      rev = "5b852370d8054a895b5ba79b5ef017c3afbb3a3c";
      sha256 = "166dwibbpb90bdy8dvhlinh6gc509f8pq8wn345h01pilf7fc8fh";
    };

    ldflags = [
      "-X main.version=${version}"
    ];
    preBuild = ''
      ldflags+=" -X main.assetRoot=$lib"
    '';
    postInstall = ''
      mkdir -p $lib
      cp -v ./data/*.nix $lib
    '';

    outputs = [ "out" "lib" ];
    vendorSha256 = "08zzp0h4c4i5hk4whz06a3da7qjms6lr36596vxz0d8q0n7rspr9";

    patches = (old.patches or []) ++ [ ./dry-run.patch ];
  });
}