]> Untitled Git - awful.systems.git/blobdiff - lemmy/server.nix
update lemmy to 0.18.2
[awful.systems.git] / lemmy / server.nix
index 9fcf594fed2ff99ee5986cfdfe2c49cae2b599ed..fa016593bb08605b618662a67dff7d7b024aa916 100644 (file)
@@ -2,7 +2,7 @@
 , Security, protobuf, rustfmt, nixosTests }:
 let
   pinData = lib.importJSON ./pin.json;
-  version = pinData.version;
+  version = pinData.serverVersion;
 in rustPlatform.buildRustPackage rec {
   inherit version;
   pname = "lemmy-server";
@@ -15,15 +15,15 @@ in rustPlatform.buildRustPackage rec {
     fetchSubmodules = true;
   };
 
+  preConfigure = ''
+    echo 'pub const VERSION: &str = "${version}";' > crates/utils/src/version.rs
+  '';
+
   cargoSha256 = pinData.serverCargoSha256;
 
   buildInputs = [ postgresql ]
     ++ lib.optionals stdenv.isDarwin [ libiconv Security ];
 
-  postPatch = ''
-    echo "pub const VERSION: &str = \"${version}\";" > "crates/utils/src/version.rs"
-  '';
-
   # Using OPENSSL_NO_VENDOR is not an option on darwin
   # As of version 0.10.35 rust-openssl looks for openssl on darwin
   # with a hardcoded path to /usr/lib/libssl.x.x.x.dylib
@@ -35,7 +35,7 @@ in rustPlatform.buildRustPackage rec {
   PROTOC_INCLUDE = "${protobuf}/include";
   nativeBuildInputs = [ protobuf rustfmt ];
 
-  passthru.updateScript = ./update.sh;
+  passthru.updateScript = ./update.py;
   passthru.tests.lemmy-server = nixosTests.lemmy;
 
   doCheck = false;