mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 11:22:58 +00: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" ```
49 lines
1.0 KiB
Nix
49 lines
1.0 KiB
Nix
{ stdenv
|
|
, lib
|
|
, mkDerivation
|
|
, fetchFromGitHub
|
|
, qmake
|
|
, qtbase
|
|
}:
|
|
|
|
mkDerivation rec {
|
|
pname = "dialogbox";
|
|
version = "1.0+unstable=2020-11-16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "martynets";
|
|
repo = pname;
|
|
rev = "6989740746f376becc989ab2698e77d14186a0f9";
|
|
hash = "sha256-paTas3KbV4yZ0ePnrOH1S3bLLHDddFml1h6b6azK4RQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
qmake
|
|
];
|
|
|
|
buildInputs = [
|
|
qtbase
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -d $out/{bin,share/doc/dialogbox}
|
|
install dist/dialogbox $out/bin
|
|
install README.md $out/share/doc/dialogbox/
|
|
cp -r demos $out/share/doc/dialogbox/demos
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
homepage = "https://github.com/martynets/dialogbox/";
|
|
description = "Qt-based scriptable engine providing GUI dialog boxes";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
platforms = platforms.unix;
|
|
mainProgram = "dialogbox";
|
|
};
|
|
}
|