X-Git-Url: http://these/git/?a=blobdiff_plain;f=lemmy%2Fui.nix;h=d1d4ce6f679f099cd9d4b51b40e8f0256961774b;hb=HEAD;hp=fe2e4ab07e667bae1541cf364dad01f65d40d6a3;hpb=eef36dd281111cf8aed923f9df52b3055bc20c68;p=awful.systems.git diff --git a/lemmy/ui.nix b/lemmy/ui.nix index fe2e4ab..d1d4ce6 100644 --- a/lemmy/ui.nix +++ b/lemmy/ui.nix @@ -1,5 +1,5 @@ { lib, mkYarnPackage, libsass, nodejs, python3, pkg-config, fetchFromGitHub -, fetchYarnDeps, nixosTests }: +, fetchYarnDeps, nixosTests, vips, nodePackages }: let pinData = lib.importJSON ./pin.json; @@ -13,10 +13,17 @@ let rm build/config.gypi ''; }; + sharp = { + nativeBuildInputs = [ pkg-config nodePackages.semver ]; + buildInputs = [ vips ]; + postInstall = '' + yarn --offline run install + ''; + }; }; name = "lemmy-ui"; - version = pinData.version; + version = pinData.uiVersion; src = fetchFromGitHub { owner = "LemmyNet"; @@ -26,10 +33,9 @@ let sha256 = pinData.uiSha256; }; - patches = [ ./disable-sharp.patch ]; in mkYarnPackage { - inherit src pkgConfig name version patches; + inherit src pkgConfig name version; extraBuildInputs = [ libsass ]; @@ -39,10 +45,6 @@ in mkYarnPackage { sha256 = pinData.uiYarnDepsSha256; }; - postPatch = '' - echo "export const VERSION = '${version}';" > "src/shared/version.ts" - ''; - yarnPreBuild = '' export npm_config_nodedir=${nodejs} ''; @@ -52,6 +54,7 @@ in mkYarnPackage { export HOME=$PWD/yarn_home ln -sf $PWD/node_modules $PWD/deps/lemmy-ui/ + echo 'export const VERSION = "${version}";' > $PWD/deps/lemmy-ui/src/shared/version.ts yarn --offline build:prod '';