zaphyra's git: nixfiles

zaphyra's nixfiles

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 
40 
41 
{
  lib,
  stdenv,
  fetchgit,
  fetchYarnDeps,
  yarnConfigHook,
  yarnBuildHook,
  yarnInstallHook,
  nodejs,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "domsonic";
  version = builtins.substring 0 6 finalAttrs.rev;
  rev = "1a49015b466af151e47bf1bf3dec971a03429ea4";

  src = fetchgit {
    url = "https://git.zaphyra.eu/domsonic";
    hash = "sha256-lsrVnTYsltaBPAvfvPrqJYX8+ky9ce0KPBgOM/c5lc4=";
    inherit (finalAttrs) rev;
  };

  yarnOfflineCache = fetchYarnDeps {
    yarnLock = finalAttrs.src + "/yarn.lock";
    hash = "sha256-A3zfYLa/UMIUR1xig3t7xQbx5nmx8Fwdqq2EFHCgSbM=";
  };

  nativeBuildInputs = [
    nodejs
    yarnConfigHook
    yarnBuildHook
    yarnInstallHook
  ];

  installPhase = ''
    cp -r ./dist $out
  '';

  meta.maintainers = with lib.maintainers; [ zaphyra ];

})