mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43: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
38 lines
912 B
Nix
38 lines
912 B
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, python3
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "chrome-export";
|
|
version = "2.0.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bdesham";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "0p1914wfjggjavw7a0dh2nb7z97z3wrkwrpwxkdc2pj5w5lv405m";
|
|
};
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
dontBuild = true;
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp export-chrome-bookmarks export-chrome-history $out/bin
|
|
mkdir -p $out/share/man/man1
|
|
cp man_pages/*.1 $out/share/man/man1
|
|
'';
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
bash test/run_tests $out/bin
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Scripts to save Google Chrome's bookmarks and history as HTML bookmarks files";
|
|
homepage = "https://github.com/bdesham/chrome-export";
|
|
license = [ licenses.isc ];
|
|
maintainers = [ maintainers.bdesham ];
|
|
platforms = python3.meta.platforms;
|
|
};
|
|
}
|