Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 50 lines 1.0 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 rustPlatform, 5 pkgsBuildBuild, 6 stdenv, 7 zlib, 8 writableTmpDirAsHomeHook, 9}: 10 11rustPlatform.buildRustPackage (finalAttrs: { 12 pname = "amp"; 13 version = "0.7.1"; 14 15 src = fetchFromGitHub { 16 owner = "jmacdonald"; 17 repo = "amp"; 18 tag = finalAttrs.version; 19 hash = "sha256-YK+HSWTtSVLK8n7NDiif3bBqp/dQW2UTYo3yYcZ5cIA="; 20 }; 21 22 cargoHash = "sha256-6enFOmIAYOgOdoeA+pk37+BobI5AGPBxjp73Gd4C+gI="; 23 24 nativeBuildInputs = [ 25 # git rev-parse --short HEAD 26 (pkgsBuildBuild.writeShellScriptBin "git" "echo 0000000") 27 ]; 28 29 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ 30 zlib 31 ]; 32 33 # Needing libgit2 <=1.8.0 34 #env.LIBGIT2_NO_VENDOR = 1; 35 36 nativeCheckInputs = [ 37 writableTmpDirAsHomeHook 38 ]; 39 40 meta = { 41 description = "Modern text editor inspired by Vim"; 42 homepage = "https://amp.rs"; 43 license = lib.licenses.gpl3Only; 44 maintainers = with lib.maintainers; [ 45 sb0 46 aleksana 47 ]; 48 mainProgram = "amp"; 49 }; 50})