Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, perl }: 2 3stdenv.mkDerivation rec { 4 pname = "gnused"; 5 version = "4.9"; 6 7 src = fetchurl { 8 url = "mirror://gnu/sed/sed-${version}.tar.xz"; 9 sha256 = "sha256-biJrcy4c1zlGStaGK9Ghq6QteYKSLaelNRljHSSXUYE="; 10 }; 11 12 outputs = [ "out" "info" ]; 13 14 nativeBuildInputs = [ perl ]; 15 preConfigure = "patchShebangs ./build-aux/help2man"; 16 17 # Prevents attempts of running 'help2man' on cross-built binaries. 18 PERL = if stdenv.hostPlatform == stdenv.buildPlatform then null else "missing"; 19 20 meta = { 21 homepage = "https://www.gnu.org/software/sed/"; 22 description = "GNU sed, a batch stream editor"; 23 24 longDescription = '' 25 Sed (stream editor) isn't really a true text editor or text 26 processor. Instead, it is used to filter text, i.e., it takes 27 text input and performs some operation (or set of operations) on 28 it and outputs the modified text. Sed is typically used for 29 extracting part of a file using pattern matching or substituting 30 multiple occurrences of a string within a file. 31 ''; 32 33 license = lib.licenses.gpl3Plus; 34 35 platforms = lib.platforms.unix; 36 maintainers = with lib.maintainers; [ mic92 ]; 37 mainProgram = "sed"; 38 }; 39}