mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
32 lines
967 B
Nix
32 lines
967 B
Nix
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libconfuse, gettext }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "genimage";
|
|
version = "18";
|
|
|
|
src = fetchurl {
|
|
url = "https://public.pengutronix.de/software/genimage/genimage-${version}.tar.xz";
|
|
sha256 = "sha256-68P4hsTYAGTdbG1ePC6Y5aZwB4JkEIzi+Jraii4T/t0=";
|
|
};
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
|
buildInputs = [ libconfuse gettext ];
|
|
|
|
postInstall = ''
|
|
# As there is no manpage or built-in --help, add the README file for
|
|
# documentation.
|
|
docdir="$out/share/doc/genimage"
|
|
mkdir -p "$docdir"
|
|
cp -v README.rst "$docdir"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
homepage = "https://git.pengutronix.de/cgit/genimage";
|
|
description = "Generate filesystem images from directory trees";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.all;
|
|
maintainers = [ maintainers.bjornfor ];
|
|
mainProgram = "genimage";
|
|
};
|
|
}
|