nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1728B)


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