mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +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.
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, makeWrapper, which, perl, perlPackages }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "taskopen";
|
|
version = "1.1.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ValiValpas";
|
|
repo = "taskopen";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-/xf7Ph2KKiZ5lgLKk95nCgw/z9wIBmuWf3QGaNebgHg=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# We don't need a DESTDIR and an empty string results in an absolute path
|
|
# (due to the trailing slash) which breaks the build.
|
|
sed 's|$(DESTDIR)/||' -i Makefile
|
|
'';
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = [ which ]
|
|
++ (with perlPackages; [ JSON perl ]);
|
|
|
|
installPhase = ''
|
|
make PREFIX=$out
|
|
make PREFIX=$out install
|
|
'';
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/taskopen \
|
|
--set PERL5LIB "$PERL5LIB"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Script for taking notes and open urls with taskwarrior";
|
|
mainProgram = "taskopen";
|
|
homepage = "https://github.com/ValiValpas/taskopen";
|
|
platforms = platforms.linux;
|
|
license = licenses.gpl2Plus;
|
|
maintainers = [ maintainers.winpat ];
|
|
};
|
|
}
|