Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 34 lines 752 B view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "oed"; 9 version = "7.4"; 10 11 src = fetchFromGitHub { 12 owner = "ibara"; 13 repo = "oed"; 14 rev = "oed-${version}"; 15 hash = "sha256-bbV89YhrmL7tOgKly5OfQDRz4QE0UzZrVsmoXiJ7ZZw="; 16 }; 17 18 postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' 19 substituteInPlace configure --replace "./conftest" "echo" 20 ''; 21 22 installPhase = '' 23 install -m755 -Dt $out/bin ed 24 install -m644 -Dt $out/share/man/man1 ed.1 25 ''; 26 27 meta = with lib; { 28 description = "Portable ed editor from OpenBSD"; 29 homepage = "https://github.com/ibara/oed"; 30 license = with licenses; [ bsd2 ]; 31 mainProgram = "ed"; 32 platforms = platforms.unix; 33 }; 34}