diff options
Diffstat (limited to 'pkgs/by-name/tr/treedome/package.nix')
-rw-r--r-- | pkgs/by-name/tr/treedome/package.nix | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/pkgs/by-name/tr/treedome/package.nix b/pkgs/by-name/tr/treedome/package.nix index ca92f33ed5dd1..de0236d0a9306 100644 --- a/pkgs/by-name/tr/treedome/package.nix +++ b/pkgs/by-name/tr/treedome/package.nix @@ -8,7 +8,10 @@ , gsettings-desktop-schemas , gtk3 , libsoup -, mkYarnPackage +, stdenv +, yarnConfigHook +, yarnBuildHook +, nodejs , openssl , pkg-config , rustPlatform @@ -28,31 +31,20 @@ let fetchLFS = true; }; - frontend-build = mkYarnPackage { - inherit version src; + frontend-build = stdenv.mkDerivation (finalAttrs: { pname = "treedome-ui"; + inherit version src; offlineCache = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; hash = "sha256-CrD/n8z5fJKkBKEcvpRHJaqXBt1gbON7VsuLb2JGu1A="; }; - packageJSON = ./package.json; - - configurePhase = '' - runHook preConfigure - ln -s $node_modules node_modules - runHook postConfigure - ''; - - buildPhase = '' - runHook preBuild - - export HOME=$(mktemp -d) - yarn --offline run build - - runHook postBuild - ''; + nativeBuildInputs = [ + yarnConfigHook + yarnBuildHook + nodejs + ]; installPhase = '' runHook preInstall @@ -62,9 +54,7 @@ let runHook postInstall ''; - - doDist = false; - }; + }); in rustPlatform.buildRustPackage { inherit version pname src; |