mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 02:44:30 +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" ```
35 lines
994 B
Nix
35 lines
994 B
Nix
{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, darwin }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
version = "0.3.1";
|
|
pname = "transmission-rss";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "herlon214";
|
|
repo = pname;
|
|
rev = "5bbad7a81621a194b7a8b11a56051308a7ccbf06";
|
|
sha256 = "sha256-SkEgxinqPA9feOIF68oewVyRKv3SY6fWWZLGJeH+r4M=";
|
|
};
|
|
|
|
cargoPatches = [ ./update-cargo-lock-version.patch ];
|
|
|
|
cargoHash = "sha256-QNMdqoxxY8ao2O44hJxZNgLrPwzu9+ieweTPc7pfFY4=";
|
|
|
|
nativeBuildInputs = [pkg-config];
|
|
buildInputs = [openssl]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
|
Security
|
|
SystemConfiguration
|
|
]);
|
|
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
meta = with lib; {
|
|
description = "Add torrents to transmission based on RSS list";
|
|
homepage = "https://github.com/herlon214/transmission-rss";
|
|
maintainers = with maintainers; [ icewind1991 ];
|
|
license = licenses.mit;
|
|
mainProgram = "transmission-rss";
|
|
};
|
|
}
|