-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhyperwalker.nix
More file actions
39 lines (32 loc) · 1.38 KB
/
hyperwalker.nix
File metadata and controls
39 lines (32 loc) · 1.38 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
{ lib, fetchurl, buildGoModule, nix-gitignore, makeWrapper, firefox, version ? "unstable"
}:
let freezeDry = fetchurl { url = "https://git.callpipe.com/dvn/hyperwalker/-/jobs/16551/artifacts/raw/build/freeze-dry/freeze-dry.umd.js"; hash = "sha256-Vc1vLLllFwekmDcyeB+PF9mYTvJFd3WLBAERORv9ER8="; };
in buildGoModule rec {
pname = "HyperWalker";
inherit version;
# In 'nix develop', we don't need a copy of the source tree
# in the Nix store.
src = nix-gitignore.gitignoreSource ''
/*.nix
/flake.lock
'' ./.;
# This hash locks the dependencies of this package. It is
# necessary because of how Go requires network access to resolve
# VCS. See https://www.tweag.io/blog/2021-03-04-gomod2nix/ for
# details. Normally one can build with a fake sha256 and rely on native Go
# mechanisms to tell you what the hash should be or determine what
# it should be "out-of-band" with other tooling (eg. gomod2nix).
# To begin with it is recommended to set this, but one must
# remeber to bump this hash when your dependencies change.
#vendorSha256 = pkgs.lib.fakeSha256;
vendorSha256 = "sha256-yWl8xHSU480B9nkMGaFrJ0L+MmgmM7sLIvluub9S02c=";
prePatch = ''
mkdir -p js/dist
cp ${freezeDry} js/dist/freeze-dry.umd.js
'';
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/${pname} \
--prefix PATH : ${lib.makeBinPath [ firefox ]}
'';
}