ja2-stracciatella: upgrade cargo fetcher and cargoSha256

This commit is contained in:
Benjamin Hipple 2020-03-09 00:15:13 -04:00
parent 3f22f3a044
commit 81cb6ccb57

View file

@ -1,5 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, SDL2, boost, fltk, rustPlatform }: { stdenv, fetchFromGitHub, cmake, SDL2, boost, fltk, rustPlatform }:
with rustPlatform;
let let
version = "0.16.1"; version = "0.16.1";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -18,12 +17,11 @@ let
cp ${lockfile} $out/Cargo.lock cp ${lockfile} $out/Cargo.lock
''; '';
}; };
libstracciatella = buildRustPackage { libstracciatella = rustPlatform.buildRustPackage {
name = "libstracciatella-${version}"; pname = "libstracciatella";
inherit version; inherit version;
src = libstracciatellaSrc; src = libstracciatellaSrc;
legacyCargoFetcher = true; cargoSha256 = "15djs4xaz4y1hpfyfqxdgdasxr0b5idy9i5a7c8cmh0jkxjv8bqc";
cargoSha256 = "0a1pc8wyvgmna0a5cbpv3mh0h4nzjxlm887ymcq00cy1ciq5nmj4";
doCheck = false; doCheck = false;
}; };
in in
@ -37,15 +35,17 @@ stdenv.mkDerivation {
patches = [ patches = [
./remove-rust-buildstep.patch ./remove-rust-buildstep.patch
]; ];
preConfigure = '' preConfigure = ''
sed -i -e 's|rust-stracciatella|${libstracciatella}/lib/libstracciatella.so|g' CMakeLists.txt sed -i -e 's|rust-stracciatella|${libstracciatella}/lib/libstracciatella.so|g' CMakeLists.txt
cmakeFlagsArray+=("-DEXTRA_DATA_DIR=$out/share/ja2") cmakeFlagsArray+=("-DEXTRA_DATA_DIR=$out/share/ja2")
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;
meta = { meta = {
description = "Jagged Alliance 2, with community fixes"; description = "Jagged Alliance 2, with community fixes";
license = "SFI Source Code license agreement"; license = "SFI Source Code license agreement";
homepage = https://ja2-stracciatella.github.io/; homepage = "https://ja2-stracciatella.github.io/";
}; };
} }