mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +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" ```
63 lines
1.4 KiB
Nix
63 lines
1.4 KiB
Nix
{ stdenv
|
|
, lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, libsodium
|
|
, Security
|
|
, sqlite
|
|
, nix-update-script
|
|
, testers
|
|
, rustdesk-server
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "rustdesk-server";
|
|
version = "1.1.11-1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rustdesk";
|
|
repo = "rustdesk-server";
|
|
rev = version;
|
|
hash = "sha256-dAw1xKyZovPkz1qw58QymIvv7ABhmHs2lFx/H6g7GgI=";
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"async-speed-limit-0.3.1" = "sha256-iOel6XA07RPrBjQAFLnxXX4VBpDrYZaqQc9clnsOorI=";
|
|
"confy-0.4.0" = "sha256-e91cvEixhpPzIthAxzTa3fDY6eCsHUy/eZQAqs7QTDo=";
|
|
"tokio-socks-0.5.1" = "sha256-inmAJk0fAlsVNIwfD/M+htwIdQHwGSTRrEy6N/mspMI=";
|
|
};
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
libsodium
|
|
sqlite
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
Security
|
|
];
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
tests.version = testers.testVersion {
|
|
inherit version;
|
|
package = rustdesk-server;
|
|
command = "hbbr --version";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "RustDesk Server Program";
|
|
homepage = "https://github.com/rustdesk/rustdesk-server";
|
|
changelog = "https://github.com/rustdesk/rustdesk-server/releases/tag/${version}";
|
|
license = licenses.agpl3Only;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ gaelreyrol tjni ];
|
|
};
|
|
}
|