Skip to content

Commit 04f0c72

Browse files
authored
nix-init: refactor with nixfmt-rfc-style, passthru.tests.version and removing darwin sdk (#356985)
2 parents 71d5dab + ee2d6d1 commit 04f0c72

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

pkgs/by-name/ni/nix-init/package.nix

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
{ lib
2-
, writeText
3-
, rustPlatform
4-
, fetchFromGitHub
5-
, curl
6-
, installShellFiles
7-
, pkg-config
8-
, bzip2
9-
, libgit2
10-
, openssl
11-
, zlib
12-
, zstd
13-
, stdenv
14-
, darwin
15-
, spdx-license-list-data
16-
, nix
17-
, nurl
1+
{
2+
lib,
3+
writeText,
4+
rustPlatform,
5+
fetchFromGitHub,
6+
curl,
7+
installShellFiles,
8+
pkg-config,
9+
bzip2,
10+
libgit2,
11+
openssl,
12+
zlib,
13+
zstd,
14+
stdenv,
15+
spdx-license-list-data,
16+
nix,
17+
nurl,
18+
testers,
19+
nix-init,
1820
}:
1921

2022
let
@@ -51,10 +53,6 @@ rustPlatform.buildRustPackage rec {
5153
openssl
5254
zlib
5355
zstd
54-
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
55-
darwin.apple_sdk.frameworks.Security
56-
] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
57-
darwin.apple_sdk.frameworks.CoreFoundation
5856
];
5957

6058
buildNoDefaultFeatures = true;
@@ -88,6 +86,10 @@ rustPlatform.buildRustPackage rec {
8886
ZSTD_SYS_USE_PKG_CONFIG = true;
8987
};
9088

89+
passthru.tests.version = testers.testVersion {
90+
package = nix-init;
91+
};
92+
9193
meta = with lib; {
9294
description = "Command line tool to generate Nix packages from URLs";
9395
mainProgram = "nix-init";

0 commit comments

Comments
 (0)