Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
notthebee committed Oct 26, 2024
2 parents e769d13 + 072f2ee commit 7a27a3c
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
stdenv,
coreutils,
bash,
direnv,
git,
pkg-config,
openssl,
direnv,
Security,
SystemConfiguration,
usage,
Expand All @@ -19,22 +20,16 @@

rustPlatform.buildRustPackage rec {
pname = "mise";
version = "2024.9.0";
version = "2024.10.8";

src = fetchFromGitHub {
owner = "jdx";
repo = "mise";
rev = "v${version}";
hash = "sha256-q515JEpws1UnZm1b8zgGxPvudH846XV+Ct4qKN2mNMQ=";

# registry is not needed for compilation nor for tests.
# contains files with the same name but different case, which cause problems with hash on darwin
postFetch = ''
rm -rf $out/registry
'';
hash = "sha256-58y7jx7gmWlccezZXP5hSzrvnq8hlZ1QakF+FMgbwcc=";
};

cargoHash = "sha256-jGqaGbue+AEK0YjhHMlm84XBgA20p8Um03TjctjXVz0=";
cargoHash = "sha256-m2Eiqyh/rGgwRgRArs3fPWoqzi1EidZd5i66yi4SuFo=";

nativeBuildInputs = [
installShellFiles
Expand All @@ -52,27 +47,30 @@ rustPlatform.buildRustPackage rec {
./test/data/plugins/**/bin/* \
./src/fake_asdf.rs \
./src/cli/generate/git_pre_commit.rs \
./src/cli/generate/snapshots/*.snap \
./src/cli/reshim.rs \
./test/cwd/.mise/tasks/filetask
./src/cli/generate/snapshots/*.snap
substituteInPlace ./src/test.rs \
--replace-fail '/usr/bin/env bash' '${bash}/bin/bash'
--replace-fail '/usr/bin/env bash' '${lib.getExe bash}' \
--replace-fail '"git"' '"${lib.getExe git}"'
substituteInPlace ./src/git.rs \
--replace-fail '"git"' '"${lib.getExe git}"'
substituteInPlace ./src/env_diff.rs \
--replace-fail '"bash"' '"${bash}/bin/bash"'
--replace-fail '"bash"' '"${lib.getExe bash}"'
substituteInPlace ./src/cli/direnv/exec.rs \
--replace-fail '"env"' '"${coreutils}/bin/env"' \
--replace-fail 'cmd!("direnv"' 'cmd!("${direnv}/bin/direnv"'
--replace-fail '"env"' '"${lib.getExe' coreutils "env"}"' \
--replace-fail 'cmd!("direnv"' 'cmd!("${lib.getExe direnv}"'
'';

checkFlags = [
# Requires .git directory to be present
"--skip=cli::plugins::ls::tests::test_plugin_list_urls"
"--skip=cli::generate::git_pre_commit::tests::test_git_pre_commit"
"--skip=cli::generate::github_action::tests::test_github_action"
# last_modified will always be different in nix
"--skip=tera::tests::test_last_modified"
# requires https://github.com/rbenv/ruby-build
"--skip=plugins::core::ruby::tests::test_list_versions_matching"
];

cargoTestFlags = [ "--all-features" ];
# some tests access the same folders, don't test in parallel to avoid race conditions
dontUseCargoParallelTests = true;
Expand All @@ -81,8 +79,8 @@ rustPlatform.buildRustPackage rec {
installManPage ./man/man1/mise.1
substituteInPlace ./completions/{mise.bash,mise.fish,_mise} \
--replace-fail '-v usage' '-v ${usage}/bin/usage' \
--replace-fail 'usage complete-word' '${usage}/bin/usage complete-word'
--replace-fail '-v usage' '-v ${lib.getExe usage}' \
--replace-fail 'usage complete-word' '${lib.getExe usage} complete-word'
installShellCompletion \
--bash ./completions/mise.bash \
Expand Down
17 changes: 9 additions & 8 deletions pkgs/by-name/op/openapi-python-client/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
python3Packages,
fetchFromGitHub,
installShellFiles,
ruff,
testers,
openapi-python-client,
}:
Expand Down Expand Up @@ -35,22 +34,24 @@ python3Packages.buildPythonApplication rec {
hatchling
];

dependencies =
(with python3Packages; [
dependencies = (
with python3Packages;
[
attrs
httpx
jinja2
pydantic
python-dateutil
ruamel-yaml
ruff
shellingham
typer
typing-extensions
])
++ [ ruff ];

# ruff is not packaged as a python module in nixpkgs
pythonRemoveDeps = [ "ruff" ];
]
);
# openapi-python-client defines upper bounds to the dependencies, ruff python library is
# just a simple wrapper to locate the binary. We'll remove the upper bound
pythonRelaxDeps = [ "ruff" ];

postInstall = ''
# see: https://github.com/fastapi/typer/blob/5889cf82f4ed925f92e6b0750bf1b1ed9ee672f3/typer/completion.py#L54
Expand Down
42 changes: 42 additions & 0 deletions pkgs/development/python-modules/netbox-bgp/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
netbox,
pytestCheckHook,
python,
}:

buildPythonPackage rec {
pname = "netbox-bgp";
version = "0.14.0";
pyproject = true;

src = fetchFromGitHub {
owner = "netbox-community";
repo = "netbox-bgp";
rev = "v${version}";
hash = "sha256-O/kvohyQRhAkDKN5smygyrldINkTQX6yY4eTHn7zSPU";
};

build-system = [ setuptools ];

nativeCheckInputs = [ netbox ];

preFixup = ''
export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
'';

dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion;

pythonImportsCheck = [ "netbox_bgp" ];

meta = {
description = "NetBox plugin for BGP related objects documentation";
homepage = "https://github.com/netbox-community/netbox-bgp";
changelog = "https://github.com/netbox-community/netbox-bgp/releases/tag/${src.rev}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ felbinger ];
};
}
5 changes: 3 additions & 2 deletions pkgs/development/tools/build-managers/gup/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{ stdenv, fetchFromGitHub, nix-update-source, lib, python3
, which, runtimeShell, pylint }:
stdenv.mkDerivation rec {
version = "0.9.1";
version = "0.9.2";
src = fetchFromGitHub {
hash = "sha256-bV5HauM0xmRI/9Pxp1cYLPLA8PbFvPER2y4mAMmgchs=";
owner = "timbertson";
repo = "gup";
rev = "version-${version}";
sha256 = "1wfw46b647rkalwds6547ylzy353b3xlklhcl2xjgj2gihvi30mx";
};
pname = "gup";
nativeBuildInputs = [ python3 which pylint ];
Expand All @@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
--set repo gup \
--set type fetchFromGitHub \
--set rev 'version-{version}' \
--nix-literal rev 'version-''${version}'\
--modify-nix default.nix
''
];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16712,7 +16712,7 @@ with pkgs;

asdf-vm = callPackage ../tools/misc/asdf-vm { };

mise = callPackage ../tools/misc/mise {
mise = callPackage ../by-name/mi/mise/package.nix {
inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration;
};

Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8889,6 +8889,8 @@ self: super: with self; {

netapp-ontap = callPackage ../development/python-modules/netapp-ontap { };

netbox-bgp = callPackage ../development/python-modules/netbox-bgp { };

netbox-documents = callPackage ../development/python-modules/netbox-documents { };

netbox-reorder-rack = callPackage ../development/python-modules/netbox-reorder-rack { };
Expand Down

0 comments on commit 7a27a3c

Please sign in to comment.