a dotfile but it's really big
at main 60 lines 1.3 kB view raw
1{ 2 lib, 3 fetchPnpmDeps, 4 fetchgit, 5 pnpm_9, 6 makeWrapper, 7 nodejs, 8 pnpmConfigHook, 9 stdenv, 10}: 11stdenv.mkDerivation (finalAttrs: { 12 pname = "malachite"; 13 version = "0.7.0"; 14 15 src = fetchgit { 16 url = "https://tangled.org/karitham.dev/atproto-lastfm-importer"; 17 rev = "HEAD"; 18 hash = "sha256-K3k8lTAO/zKijJmqNAPeJS8LMPqcXQYXmDEfwjKsab8="; 19 deepClone = false; 20 }; 21 22 nativeBuildInputs = [ 23 nodejs 24 pnpmConfigHook 25 pnpm_9 26 makeWrapper 27 ]; 28 29 pnpmDeps = fetchPnpmDeps { 30 inherit (finalAttrs) pname version src; 31 pnpm = pnpm_9; 32 fetcherVersion = 3; 33 hash = "sha256-Y94PgzvxLZcSiK4sBrxm1KrBhOLh1QXaJpuFstl4RSk="; 34 }; 35 36 buildPhase = '' 37 runHook preBuild 38 pnpm build 39 runHook postBuild 40 ''; 41 42 installPhase = '' 43 runHook preInstall 44 45 mkdir -p $out/lib/node_modules/malachite 46 cp -r . $out/lib/node_modules/malachite 47 48 makeWrapper ${nodejs}/bin/node $out/bin/lastfm-import \ 49 --add-flags "$out/lib/node_modules/malachite/dist/index.js" 50 51 runHook postInstall 52 ''; 53 54 meta = with lib; { 55 description = "Import your Last.fm listening history to the AT Protocol network using the fm.teal.alpha.feed.play lexicon"; 56 homepage = "https://tangled.org/ewancroft.uk/atproto-lastfm-importer"; 57 license = licenses.mit; 58 mainProgram = "lastfm-import"; 59 }; 60})