nur-packages

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

package.nix (1440B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   fetchPnpmDeps,
      6   cacert,
      7   nodejs,
      8   pnpm,
      9   pnpmConfigHook,
     10   writableTmpDirAsHomeHook,
     11 }:
     12 
     13 stdenv.mkDerivation (finalAttrs: {
     14   pname = "overpass-turbo";
     15   version = "2026-07-19";
     16 
     17   src = fetchFromGitHub {
     18     owner = "tyrasd";
     19     repo = "overpass-turbo";
     20     rev = "bb21a1cad2bbb3bf02abeb380b565244feed2bf7";
     21     hash = "sha256-2KDOM2xtPg0257q2+PYI4ZC2YLnB0WyJ2SUWdk2y9ek=";
     22   };
     23 
     24   postPatch = ''
     25     substituteInPlace vite.config.mts \
     26       --replace-fail "git log -1 --format=%cd --date=short" "echo ${finalAttrs.version}" \
     27       --replace-fail "git describe --always" "echo ${finalAttrs.src.rev}"
     28   '';
     29 
     30   pnpmDeps = fetchPnpmDeps {
     31     inherit (finalAttrs) pname version src;
     32     fetcherVersion = 4;
     33     hash = "sha256-NlZZvty3nfZcxb/Cw6X8IHIlJbqiSRrkDycgtQgvsIg=";
     34   };
     35 
     36   nativeBuildInputs = [
     37     nodejs
     38     pnpm
     39     pnpmConfigHook
     40     writableTmpDirAsHomeHook
     41   ];
     42 
     43   buildPhase = ''
     44     runHook preBuild
     45     pnpm build
     46     runHook postBuild
     47   '';
     48 
     49   installPhase = ''
     50     mv dist $out
     51   '';
     52 
     53   env.SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
     54 
     55   meta = {
     56     description = "A web based data mining tool for OpenStreetMap using the Overpass API";
     57     homepage = "https://github.com/tyrasd/overpass-turbo";
     58     license = lib.licenses.mit;
     59     maintainers = [ lib.maintainers.sikmir ];
     60     broken = true; # Error: Cannot find module './vite-plus.linux-x64-gnu.node'
     61   };
     62 })