nixpkgs/pkgs/by-name/di/discount/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

44 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
version = "3.0.0d";
pname = "discount";
src = fetchFromGitHub {
owner = "Orc";
repo = pname;
rev = "v${version}";
sha256 = "sha256-fFSlW9qnH3NL9civ793LrScOJSuRe9i377BgpNzOXa0=";
};
patches = [ ./fix-configure-path.patch ];
configureScript = "./configure.sh";
configureFlags = [
"--shared"
"--debian-glitch" # use deterministic mangling
"--pkg-config"
"--h1-title"
];
enableParallelBuilding = true;
installTargets = [ "install.everything" ];
doCheck = true;
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
install_name_tool -id "$out/lib/libmarkdown.dylib" "$out/lib/libmarkdown.dylib"
for exe in $out/bin/*; do
install_name_tool -change libmarkdown.dylib "$out/lib/libmarkdown.dylib" "$exe"
done
'';
meta = with lib; {
description = "Implementation of Markdown markup language in C";
homepage = "http://www.pell.portland.or.us/~orc/Code/discount/";
license = licenses.bsd3;
maintainers = with maintainers; [ shell ];
mainProgram = "markdown";
platforms = platforms.unix;
};
}