Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenvNoCC, 4 fetchFromGitHub, 5 fetchYarnDeps, 6 yarnConfigHook, 7 yarnBuildHook, 8 yarnInstallHook, 9 nodejs, 10 versionCheckHook, 11 nix-update-script, 12}: 13 14stdenvNoCC.mkDerivation (finalAttrs: { 15 pname = "gitmoji-cli"; 16 version = "9.7.0"; 17 18 src = fetchFromGitHub { 19 owner = "carloscuesta"; 20 repo = "gitmoji-cli"; 21 rev = "v${finalAttrs.version}"; 22 hash = "sha256-2nQCxmZdDMKHcmVihloU4leKRB9LRBO4Q5AINR1vdCQ="; 23 }; 24 25 offlineCache = fetchYarnDeps { 26 yarnLock = "${finalAttrs.src}/yarn.lock"; 27 hash = "sha256-YemcF7hRg+LAkR3US1xAgE0ELAeZTVLhscOphjmheRI="; 28 }; 29 30 nativeBuildInputs = [ 31 yarnConfigHook 32 yarnBuildHook 33 yarnInstallHook 34 # Needed for executing package.json scripts 35 nodejs 36 ]; 37 38 nativeInstallCheckInputs = [ versionCheckHook ]; 39 doInstallCheck = true; 40 versionCheckProgram = "${placeholder "out"}/bin/gitmoji"; 41 42 passthru.updateScript = nix-update-script { }; 43 44 meta = { 45 description = "Gitmoji client for using emojis on commit messages"; 46 homepage = "https://github.com/carloscuesta/gitmoji-cli"; 47 changelog = "https://github.com/carloscuesta/gitmoji-cli/releases/tag/v${finalAttrs.version}"; 48 license = lib.licenses.mit; 49 mainProgram = "gitmoji"; 50 maintainers = with lib.maintainers; [ 51 nequissimus 52 yzx9 53 ]; 54 }; 55})