mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +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" ```
36 lines
948 B
Nix
36 lines
948 B
Nix
{ mkDerivation, lib, stdenv, fetchFromGitHub, qmake, qttools, qtbase }:
|
|
|
|
mkDerivation rec {
|
|
pname = "calaos_installer";
|
|
version = "3.11";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "calaos";
|
|
repo = "calaos_installer";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-e/f58VtGmKukdv4rIrGljXhA9d/xUycM5V6I1FT5qeY=";
|
|
};
|
|
|
|
nativeBuildInputs = [ qmake qttools ];
|
|
buildInputs = [ qtbase ];
|
|
|
|
qmakeFlags = [ "REVISION=${version}" ];
|
|
|
|
installPhase = if stdenv.hostPlatform.isDarwin then ''
|
|
mkdir -p $out/Applications
|
|
cp -a calaos_installer.app $out/Applications
|
|
'' else ''
|
|
mkdir -p $out/bin
|
|
cp -a calaos_installer $out/bin
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Calaos Installer, a tool to create calaos configuration";
|
|
mainProgram = "calaos_installer";
|
|
homepage = "https://www.calaos.fr/";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ tiramiseb ];
|
|
};
|
|
}
|