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
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, perl
|
|
, perlPackages
|
|
, inkscape
|
|
, pngcrush
|
|
, librsvg
|
|
, targets ? [ "all" ]
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "iso-flags";
|
|
version = "unstable-18012020";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "joielechong";
|
|
repo = "iso-country-flags-svg-collection";
|
|
rev = "9ebbd577b9a70fbfd9a1931be80c66e0d2f31a9d";
|
|
sha256 = "17bm7w4md56xywixfvp7vr3d6ihvxk3383i9i4rpmgm6qa9dyxdl";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
perl
|
|
inkscape
|
|
librsvg
|
|
(perl.withPackages(pp: with pp; [ JSON XMLLibXML ]))
|
|
];
|
|
|
|
postPatch = ''
|
|
patchShebangs .
|
|
'';
|
|
|
|
buildFlags = targets;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share
|
|
mv build $out/share/iso-flags
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/joielechong/iso-country-flags-svg-collection";
|
|
description = "248 country flag SVG & PNG icons with different icon styles";
|
|
license = [ licenses.publicDomain ];
|
|
platforms = platforms.linux; # the output assets should work anywhere, but unsure about the tools to build them...
|
|
maintainers = [ maintainers.mkg20001 ];
|
|
};
|
|
}
|