nixpkgs/pkgs/by-name/is/iso-flags/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

46 lines
1.0 KiB
Nix

{ lib, stdenvNoCC
, fetchFromGitHub
, perl
, inkscape
, librsvg
, targets ? [ "all" ]
}:
stdenvNoCC.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 ];
};
}