Skip to content

Commit

Permalink
Merge pull request #2 from matejc/lemmy-0_18_0
Browse files Browse the repository at this point in the history
lemmy: write version to correct file
  • Loading branch information
adisbladis committed Jun 27, 2023
2 parents 21986a1 + 31fcf2b commit 494a8fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions pkgs/servers/web-apps/lemmy/server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ rustPlatform.buildRustPackage rec {
./tokio-macros.patch
];

preConfigure = ''
echo 'pub const VERSION: &str = "${version}";' > crates/utils/src/version.rs
'';

cargoSha256 = pinData.serverCargoSha256;

buildInputs = [ postgresql ]
Expand Down
5 changes: 1 addition & 4 deletions pkgs/servers/web-apps/lemmy/ui.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ 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
'';
Expand All @@ -74,10 +75,6 @@ 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;
Expand Down

0 comments on commit 494a8fa

Please sign in to comment.