nur-packages

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

default.nix (1698B)


      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   cargoHash = "sha256-ubZLTX1MQaUA0VWjdL8ehvsgHM4tVQbl8ByMIvTiZqw=";
     34 
     35   nativeBuildInputs = [ pkg-config ];
     36 
     37   buildInputs = [
     38     atk
     39     cairo
     40     gdk-pixbuf
     41     glib
     42     gtk3
     43     harfbuzz
     44     openssl
     45     pango
     46   ];
     47 
     48   postPatch = ''
     49     substituteInPlace ./configure.sh \
     50       --replace-fail "target/release" "target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release"
     51 
     52     patchShebangs configure.sh
     53   '';
     54 
     55   configurePhase = ''
     56     export PKG_CONFIG_PATH='${lib.makeSearchPathOutput "dev" "lib/pkgconfig" buildInputs}'
     57 
     58     ./configure.sh --prefix $out
     59 
     60     substituteInPlace install.sh \
     61       --replace-fail "/etc/firejail" "$out/etc/firejail"
     62 
     63     patchShebangs install.sh
     64   '';
     65 
     66   env.NIX_LDFLAGS = "-L${zlib}/lib";
     67 
     68   installPhase = ''
     69     ./install.sh
     70     install -Dm644 ${./inkatlas.json} $out/share/garta/maps/inkatlas.json
     71     rm -fr $out/etc
     72   '';
     73 
     74   enableParallelBuilding = true;
     75 
     76   meta = {
     77     description = "Geo-bookmarking, GPX viewer, analyzer and editor for GTK3";
     78     homepage = "https://gitlab.com/timosaarinen/garta";
     79     license = lib.licenses.gpl3Plus;
     80     maintainers = [ lib.maintainers.sikmir ];
     81     skip.ci = true;
     82   };
     83 }