mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
571c71e6f7
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.
33 lines
941 B
Nix
33 lines
941 B
Nix
{ stdenv, lib, fetchFromGitHub, makeWrapper, unzip, catdoc }:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "catdocx";
|
|
version = "unstable-2017-01-02";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jncraton";
|
|
repo = "catdocx";
|
|
rev = "04fa0416ec1f116d4996685e219f0856d99767cb";
|
|
sha256 = "1sxiqhkvdqn300ygfgxdry2dj2cqzjhkzw13c6349gg5vxfypcjh";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/libexec $out/bin
|
|
cp catdocx.sh $out/libexec
|
|
chmod +x $out/libexec/catdocx.sh
|
|
wrapProgram $out/libexec/catdocx.sh --prefix PATH : "${lib.makeBinPath [ unzip catdoc ]}"
|
|
ln -s $out/libexec/catdocx.sh $out/bin/catdocx
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Extracts plain text from docx files";
|
|
mainProgram = "catdocx";
|
|
homepage = "https://github.com/jncraton/catdocx";
|
|
license = with licenses; [ bsd3 ];
|
|
maintainers = [ maintainers.michalrus ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|