nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 55 lines 1.1 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 installShellFiles, 6 ncurses, 7}: 8stdenv.mkDerivation (finalAttrs: { 9 pname = "cano"; 10 version = "0.2.0-alpha"; 11 12 src = fetchFromGitHub { 13 owner = "CobbCoding1"; 14 repo = "Cano"; 15 tag = "v${finalAttrs.version}"; 16 hash = "sha256-OaWj0AKw3+sEhcAbIjgOLfxwCKRG6O1k+zSp0GnnFn8="; 17 }; 18 19 patches = [ ./allow-read-only-store-help-page.patch ]; 20 21 postPatch = '' 22 substituteInPlace src/main.c \ 23 --replace-fail "@help@" "${placeholder "out"}/share/help" 24 ''; 25 26 nativeBuildInputs = [ installShellFiles ]; 27 28 buildInputs = [ ncurses ]; 29 30 hardeningDisable = [ 31 "format" 32 "fortify" 33 ]; 34 35 installPhase = '' 36 runHook preInstall 37 38 install -Dm755 build/cano -t $out/bin 39 40 mkdir -p $out/share 41 cp -r docs/help $out/share 42 installManPage docs/cano.1 43 44 runHook postInstall 45 ''; 46 47 meta = { 48 description = "Text Editor Written In C Using ncurses"; 49 homepage = "https://github.com/CobbCoding1/Cano"; 50 license = lib.licenses.asl20; 51 mainProgram = "Cano"; 52 maintainers = with lib.maintainers; [ sigmanificient ]; 53 platforms = lib.platforms.linux; 54 }; 55})