mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
35 lines
1.0 KiB
Nix
35 lines
1.0 KiB
Nix
{ fetchurl, lib, stdenv, makeWrapper, which, perl, perlPackages }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "taskopen-1.1.4";
|
|
src = fetchurl {
|
|
url = "https://github.com/ValiValpas/taskopen/archive/v1.1.4.tar.gz";
|
|
sha256 = "774dd89f5c92462098dd6227e181268e5ec9930bbc569f25784000df185c71ba";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = [ which perl ] ++ (with perlPackages; [ JSON ]);
|
|
|
|
installPhase = ''
|
|
# 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
|
|
|
|
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";
|
|
homepage = "https://github.com/ValiValpas/taskopen";
|
|
platforms = platforms.linux;
|
|
license = stdenv.lib.licenses.free ;
|
|
maintainers = [ maintainers.winpat ];
|
|
};
|
|
}
|