lemmy: build sharp
This commit is contained in:
parent
8b88e2ccfe
commit
4b789ef027
2 changed files with 15 additions and 0 deletions
|
@ -26,6 +26,8 @@ in
|
|||
site_name = "Lemmy FTW";
|
||||
admin_email = "mightyiam@example.com";
|
||||
};
|
||||
# https://github.com/LemmyNet/lemmy/blob/50efb1d519c63a7007a07f11cc8a11487703c70d/crates/utils/src/settings/mod.rs#L52
|
||||
database.uri = "postgres:///lemmy?host=/run/postgresql&user=lemmy";
|
||||
};
|
||||
caddy.enable = true;
|
||||
};
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
, fetchFromGitHub
|
||||
, fetchYarnDeps
|
||||
, nixosTests
|
||||
, vips
|
||||
, nodePackages
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -21,6 +23,13 @@ let
|
|||
rm build/config.gypi
|
||||
'';
|
||||
};
|
||||
sharp = {
|
||||
nativeBuildInputs = [ pkg-config nodePackages.semver ];
|
||||
buildInputs = [ vips ];
|
||||
postInstall = ''
|
||||
yarn --offline run install
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
name = "lemmy-ui";
|
||||
|
@ -65,6 +74,10 @@ mkYarnPackage {
|
|||
cp -R ./node_modules $out
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
echo 'export const VERSION = "${version}";' > $out/libexec/lemmy-ui/deps/lemmy-ui/src/shared/version.ts
|
||||
'';
|
||||
|
||||
distPhase = "true";
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
|
Loading…
Reference in a new issue