nur-packages

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

package.nix (982B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   fetchYarnDeps,
      6   nodejs,
      7   yarnConfigHook,
      8   yarnBuildHook,
      9 }:
     10 
     11 stdenv.mkDerivation (finalAttrs: {
     12   pname = "brouter-web";
     13   version = "0.18.1";
     14 
     15   __structuredAttrs = true;
     16 
     17   src = fetchFromGitHub {
     18     owner = "nrenner";
     19     repo = "brouter-web";
     20     tag = finalAttrs.version;
     21     hash = "sha256-tre+DVam2MoolUOWaBI7VOzUHR2VP3L7xO3/byg0B34=";
     22   };
     23 
     24   yarnOfflineCache = fetchYarnDeps {
     25     yarnLock = "${finalAttrs.src}/yarn.lock";
     26     hash = "sha256-vVuzWu4GFSBaVBbj/qFPDUyFGObDFMhL2m2B4tiYvvg=";
     27   };
     28 
     29   nativeBuildInputs = [
     30     nodejs
     31     yarnConfigHook
     32     yarnBuildHook
     33   ];
     34 
     35   installPhase = ''
     36     install -dm755 $out
     37     cp -r index.html dist $out
     38   '';
     39 
     40   meta = {
     41     description = "Web client for BRouter, a routing engine based on OpenStreetMap";
     42     homepage = "https://github.com/nrenner/brouter-web";
     43     license = lib.licenses.mit;
     44     maintainers = [ lib.maintainers.sikmir ];
     45     platforms = lib.platforms.all;
     46   };
     47 })