mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 13:03:34 +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" ```
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, cmake
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, testers
|
|
, Security
|
|
}:
|
|
|
|
let
|
|
pname = "amazon-qldb-shell";
|
|
version = "2.0.1";
|
|
package = rustPlatform.buildRustPackage {
|
|
inherit pname version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "awslabs";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-aXScqJ1LijMSAy9YkS5QyXtTqxd19lLt3BbyVXlbw8o=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake rustPlatform.bindgenHook ];
|
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security;
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"amazon-qldb-driver-0.1.0" = "sha256-az0rANBcryHHnpGWvo15TGGW4KMUULZHaj5msIHts14=";
|
|
};
|
|
};
|
|
|
|
passthru.tests.version = testers.testVersion { inherit package; };
|
|
|
|
meta = with lib; {
|
|
description = "Interface to send PartiQL statements to Amazon Quantum Ledger Database (QLDB)";
|
|
homepage = "https://github.com/awslabs/amazon-qldb-shell";
|
|
license = licenses.asl20;
|
|
maintainers = [ maintainers.terlar ];
|
|
mainProgram = "qldb";
|
|
# See https://hydra.nixos.org/build/255146098/log.
|
|
broken = true; # Added 2024-04-06
|
|
};
|
|
};
|
|
in
|
|
package
|