
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" ```
59 lines
1.2 KiB
Nix
59 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
ffmpeg,
|
|
poco,
|
|
ocl-icd,
|
|
opencl-clhpp,
|
|
gitUpdater,
|
|
callPackage,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "sanjuuni";
|
|
version = "0.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "MCJack123";
|
|
repo = "sanjuuni";
|
|
rev = version;
|
|
hash = "sha256-wJRPD4OWOTPiyDr9dYseRA7BI942HPfHONVJGTc/+wU=";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [
|
|
ffmpeg
|
|
poco
|
|
ocl-icd
|
|
opencl-clhpp
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 sanjuuni $out/bin/sanjuuni
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru = {
|
|
tests = {
|
|
run-on-nixos-artwork = callPackage ./tests/run-on-nixos-artwork.nix { };
|
|
};
|
|
updateScript = gitUpdater { };
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/MCJack123/sanjuuni";
|
|
description = "Command-line tool that converts images and videos into a format that can be displayed in ComputerCraft";
|
|
changelog = "https://github.com/MCJack123/sanjuuni/releases/tag/${version}";
|
|
maintainers = [ maintainers.tomodachi94 ];
|
|
license = licenses.gpl2Plus;
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
mainProgram = "sanjuuni";
|
|
};
|
|
}
|