default.nix (1607B)
1 { lib 2 , stdenv 3 , rustPlatform 4 , rust 5 , fetchFromGitLab 6 , pkg-config 7 , atk 8 , cairo 9 , gdk-pixbuf 10 , glib 11 , gtk3 12 , harfbuzz 13 , openssl 14 , pango 15 , zlib 16 }: 17 18 rustPlatform.buildRustPackage rec { 19 pname = "garta"; 20 version = "0.1.0-unstable-2021-02-08"; 21 22 src = fetchFromGitLab { 23 owner = "timosaarinen"; 24 repo = "garta"; 25 rev = "9c873318ba9d2dad8990b6439cf93c99e2702215"; 26 hash = "sha256-Swlhej0Q8SAWgpl/fh2pgTS/AWGtFh5wdE1O6RlBV60="; 27 }; 28 29 patches = [ ./parseconfig.patch ]; 30 31 cargoPatches = [ ./cargo-lock.patch ]; 32 cargoHash = "sha256-ubZLTX1MQaUA0VWjdL8ehvsgHM4tVQbl8ByMIvTiZqw="; 33 34 nativeBuildInputs = [ pkg-config ]; 35 36 buildInputs = [ atk cairo gdk-pixbuf glib gtk3 harfbuzz openssl pango ]; 37 38 postPatch = '' 39 substituteInPlace ./configure.sh \ 40 --replace-fail "target/release" "target/${rust.toRustTargetSpec stdenv.hostPlatform}/release" 41 42 patchShebangs configure.sh 43 ''; 44 45 configurePhase = '' 46 export PKG_CONFIG_PATH='${lib.makeSearchPathOutput "dev" "lib/pkgconfig" buildInputs}' 47 48 ./configure.sh --prefix $out 49 50 substituteInPlace install.sh \ 51 --replace-fail "/etc/firejail" "$out/etc/firejail" 52 53 patchShebangs install.sh 54 ''; 55 56 env.NIX_LDFLAGS = "-L${zlib}/lib"; 57 58 installPhase = '' 59 ./install.sh 60 install -Dm644 ${./inkatlas.json} $out/share/garta/maps/inkatlas.json 61 rm -fr $out/etc 62 ''; 63 64 enableParallelBuilding = true; 65 66 meta = with lib; { 67 description = "Geo-bookmarking, GPX viewer, analyzer and editor for GTK3"; 68 inherit (src.meta) homepage; 69 license = licenses.gpl3Plus; 70 maintainers = [ maintainers.sikmir ]; 71 }; 72 }