mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +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" ```
37 lines
949 B
Nix
37 lines
949 B
Nix
{ lib, stdenv, fetchzip, mbedtls, meson, ninja }:
|
|
let
|
|
webManModVersion = "1.47.42";
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "ps3netsrv";
|
|
version = "20220813";
|
|
|
|
src = fetchzip {
|
|
url = "https://github.com/aldostools/webMAN-MOD/releases/download/${webManModVersion}/${pname}_${version}.zip";
|
|
hash = "sha256-ynFuCD+tp8E/DDdB/HU9BCmwKcmQy6NBx26MKnP4W0o=";
|
|
};
|
|
|
|
sourceRoot = "./source/${pname}";
|
|
|
|
buildInputs = [
|
|
meson
|
|
ninja
|
|
mbedtls
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Doff64_t=off_t";
|
|
|
|
postInstall = ''
|
|
install -Dm644 ../LICENSE.TXT $out/usr/share/licenses/${pname}/LICENSE.TXT
|
|
'';
|
|
|
|
meta = {
|
|
description = "PS3 Net Server (mod by aldostools)";
|
|
homepage = "https://github.com/aldostools/webMAN-MOD/";
|
|
license = lib.licenses.gpl3;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = with lib.maintainers; [ makefu ];
|
|
mainProgram = "ps3netsrv";
|
|
};
|
|
}
|