FFFF fix: only add nix-update-script for non-GitHub fetchers by doronbehar · Pull Request #823 · nix-community/nix-init · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ async fn run() -> Result<()> {
}
}

let nix_update_script = matches!(fetcher, MaybeFetcher::Known(_));
let nix_update_script = matches!(fetcher, MaybeFetcher::Known(ref f) if !matches!(f, FetcherDispatch::FetchFromGitHub(_)));
match fetcher {
MaybeFetcher::Known(fetcher) => {
writeln!(out, " {fetcher},")?;
Expand Down
38 changes: 38 additions & 0 deletions tests/cmd/drv-gitlab.out/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitLab,
meson,
ninja,
nix-update-script,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "beast";
version = "1.1.2";
__structuredAttrs = true;
strictDeps = true;

src = fetchFromGitLab {
owner = "emilua";
repo = "beast";
tag = "v${finalAttrs.version}";
hash = "sha256-MASaZvhIVKmeBUcn/NjlBZ+xh+2RgwHBH2o08lklGa0=";
};

nativeBuildInputs = [
meson
ninja
];

passthru.updateScript = nix-update-script { };

meta = {
description = "[..]";
homepage = "https://gitlab.com/emilua/beast";
license = lib.licenses.boost;
maintainers = with lib.maintainers; [ alice ];
mainProgram = "beast";
platforms = lib.platforms.all;
};
})
1 change: 1 addition & 0 deletions tests/cmd/drv-gitlab.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
args = ["--headless", "--url=https://gitlab.com/emilua/beast", "--rev=v1.1.2"]
3 changes: 0 additions & 3 deletions tests/cmd/drv-no-cc.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lib,
stdenvNoCC,
fetchFromGitHub,
nix-update-script,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
Expand All @@ -18,8 +17,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {
hash = "sha256-nuw/riQaAdk0fYUpm3z978YGPDJnzc66DnOj774tPu0=";
};

passthru.updateScript = nix-update-script { };

meta = {
description = "[..]";
homepage = "https://github.com/z-shell/zi";
Expand Down
3 changes: 0 additions & 3 deletions tests/cmd/drv-rust.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
libpulseaudio,
pango,
udev,
nix-update-script,
}:

stdenv.mkDerivation (finalAttrs: {
Expand Down Expand Up @@ -65,8 +64,6 @@ stdenv.mkDerivation (finalAttrs: {
udev
];

passthru.updateScript = nix-update-script { };

meta = {
description = "[..]";
homepage = "https://github.com/ErikReider/SwayOSD";
Expand Down
3 changes: 0 additions & 3 deletions tests/cmd/drv.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
fetchFromGitHub,
meson,
ninja,
nix-update-script,
}:

stdenv.mkDerivation (finalAttrs: {
Expand All @@ -25,8 +24,6 @@ stdenv.mkDerivation (finalAttrs: {
ninja
];

passthru.updateScript = nix-update-script { };

meta = {
description = "[..]";
homepage = "https://github.com/containers/bubblewrap";
Expand Down
3 changes: 0 additions & 3 deletions tests/cmd/go.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:

buildGoModule (finalAttrs: {
Expand All @@ -26,8 +25,6 @@ buildGoModule (finalAttrs: {
"-X=main.revision=${finalAttrs.src.rev}"
];

passthru.updateScript = nix-update-script { };

meta = {
description = "[..]";
homepage = "https://github.com/junegunn/fzf";
Expand Down
3 changes: 0 additions & 3 deletions tests/cmd/python-app.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lib,
python3Packages,
fetchFromGitHub,
nix-update-script,
}:

python3Packages.buildPythonApplication (finalAttrs: {
Expand Down Expand Up @@ -55,8 +54,6 @@ python3Packages.buildPythonApplication (finalAttrs: {
"black"
];

passthru.updateScript = nix-update-script { };

meta = {
description = "[..]";
homepage = "https://github.com/psf/black";
Expand Down
3 changes: 0 additions & 3 deletions tests/cmd/python-lib.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
flit-core,
markupsafe,
babel,
nix-update-script,
}:

buildPythonPackage (finalAttrs: {
Expand Down Expand Up @@ -39,8 +38,6 @@ buildPythonPackage (finalAttrs: {
"jinja2"
];

passthru.updateScript = nix-update-script { };

meta = {
description = "[..]";
homepage = "https://github.com/pallets/jinja";
Expand Down
3 changes: 0 additions & 3 deletions tests/cmd/python-rust.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
pytest-cov,
pytest-xdist,
pytest-randomly,
nix-update-script,
}:

buildPythonPackage (finalAttrs: {
Expand Down Expand Up @@ -115,8 +114,6 @@ buildPythonPackage (finalAttrs: {
"cryptography"
];

passthru.updateScript = nix-update-script { };

meta = {
description = "[..]";
homepage = "https://github.com/pyca/cryptography";
Expand Down
3 changes: 0 additions & 3 deletions tests/cmd/rust.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
sqlite,
zlib,
zstd,
nix-update-script,
}:

rustPlatform.buildRustPackage (finalAttrs: {
Expand Down Expand Up @@ -47,8 +46,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
ZSTD_SYS_USE_PKG_CONFIG = true;
};

passthru.updateScript = nix-update-script { };

meta = {
description = "[..]";
homepage = "https://github.com/nix-community/nix-init";
Expand Down
0