nur-packages

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

package.nix (1579B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   fetchPnpmDeps,
      6   fetchpatch,
      7   nodejs,
      8   pnpm,
      9   pnpmConfigHook,
     10   writableTmpDirAsHomeHook,
     11 }:
     12 
     13 stdenv.mkDerivation (finalAttrs: {
     14   pname = "overpass-turbo";
     15   version = "2026-02-22";
     16 
     17   src = fetchFromGitHub {
     18     owner = "tyrasd";
     19     repo = "overpass-turbo";
     20     rev = "55612905349b668f9f05e0272960c194dc289745";
     21     hash = "sha256-s3A33o0jV2edkav2VvkbjRqFJ/qpo+EAATPgc2ZR5JA=";
     22   };
     23 
     24   patches = [
     25     # https://github.com/tyrasd/overpass-turbo/pull/840
     26     (fetchpatch {
     27       url = "https://github.com/tyrasd/overpass-turbo/commit/867d1a61994379da7cf3f8821bbc84796d59e769.patch";
     28       hash = "sha256-HjFfToksyBMSIK+D1AezWMTLdlMvKlwNGN0P86LnTCk=";
     29     })
     30   ];
     31 
     32   postPatch = ''
     33     substituteInPlace vite.config.mts \
     34       --replace-fail "git log -1 --format=%cd --date=short" "echo ${finalAttrs.version}" \
     35       --replace-fail "git describe --always" "echo ${finalAttrs.src.rev}"
     36   '';
     37 
     38   pnpmDeps = fetchPnpmDeps {
     39     inherit (finalAttrs) pname version src;
     40     fetcherVersion = 3;
     41     hash = "sha256-+o21KuMzbwCpZxXefSz6f+o71lHCMGIOc0ltOOihT/M=";
     42   };
     43 
     44   nativeBuildInputs = [
     45     nodejs
     46     pnpm
     47     pnpmConfigHook
     48     writableTmpDirAsHomeHook
     49   ];
     50 
     51   buildPhase = ''
     52     runHook preBuild
     53     pnpm build
     54     runHook postBuild
     55   '';
     56 
     57   installPhase = ''
     58     mv dist $out
     59   '';
     60 
     61   meta = {
     62     description = "A web based data mining tool for OpenStreetMap using the Overpass API";
     63     homepage = "https://github.com/tyrasd/overpass-turbo";
     64     license = lib.licenses.mit;
     65     maintainers = [ lib.maintainers.sikmir ];
     66   };
     67 })