generated from ProcyOS/rust-template
use private registry for extra-math
This commit is contained in:
parent
badc11aac5
commit
ace180dc6f
6 changed files with 33 additions and 16 deletions
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
[registries]
|
||||
procyos = { index = "sparse+https://git.chir.rs/api/packages/ProcyOS/cargo/" }
|
3
Cargo.lock
generated
3
Cargo.lock
generated
|
@ -35,7 +35,8 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||
[[package]]
|
||||
name = "extra-math"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.chir.rs/ProcyOS/extra_math.git#38d6abf85718d053f45c6b77c88607f245be55e0"
|
||||
source = "sparse+https://git.chir.rs/api/packages/ProcyOS/cargo/"
|
||||
checksum = "fa1061c295d9aba46636f4a0b16372ea314fcd6c8dfaf447cc719a6a9dce63aa"
|
||||
dependencies = [
|
||||
"libm",
|
||||
"num-traits",
|
||||
|
|
14
Cargo.nix
14
Cargo.nix
|
@ -22,7 +22,7 @@ args @ {
|
|||
workspaceSrc,
|
||||
ignoreLockHash,
|
||||
}: let
|
||||
nixifiedLockHash = "a2b590ebe54f290db87e552bf935f4bb11098b9ba02841e8ed499aad10c57419";
|
||||
nixifiedLockHash = "74300319bd44e956ec1895afc04c903cca3100257d7c627ba18911908b487b47";
|
||||
workspaceSrc =
|
||||
if args.workspaceSrc == null
|
||||
then ./.
|
||||
|
@ -113,15 +113,15 @@ in
|
|||
};
|
||||
});
|
||||
|
||||
"git+https://git.chir.rs/ProcyOS/extra_math.git".extra-math."0.1.0" = overridableMkRustCrate (profileName: rec {
|
||||
"sparse+https://git.chir.rs/api/packages/ProcyOS/cargo/".extra-math."0.1.0" = overridableMkRustCrate (profileName: rec {
|
||||
name = "extra-math";
|
||||
version = "0.1.0";
|
||||
registry = "git+https://git.chir.rs/ProcyOS/extra_math.git";
|
||||
src = fetchCrateGit {
|
||||
url = "https://git.chir.rs/ProcyOS/extra_math.git";
|
||||
registry = "sparse+https://git.chir.rs/api/packages/ProcyOS/cargo/";
|
||||
src = fetchCrateAlternativeRegistry {
|
||||
index = sparse+https://git.chir.rs/api/packages/ProcyOS/cargo/;
|
||||
name = "extra-math";
|
||||
version = "0.1.0";
|
||||
rev = "38d6abf85718d053f45c6b77c88607f245be55e0";
|
||||
sha256 = "fa1061c295d9aba46636f4a0b16372ea314fcd6c8dfaf447cc719a6a9dce63aa";
|
||||
};
|
||||
features = builtins.concatLists [
|
||||
["default"]
|
||||
|
@ -351,7 +351,7 @@ in
|
|||
];
|
||||
dependencies = {
|
||||
bitvec = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitvec."1.0.1" {inherit profileName;}).out;
|
||||
extra_math = (rustPackages."git+https://git.chir.rs/ProcyOS/extra_math.git".extra-math."0.1.0" {inherit profileName;}).out;
|
||||
extra_math = (rustPackages."sparse+https://git.chir.rs/api/packages/ProcyOS/cargo/".extra-math."0.1.0" {inherit profileName;}).out;
|
||||
libm = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libm."0.2.8" {inherit profileName;}).out;
|
||||
num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.19" {inherit profileName;}).out;
|
||||
${
|
||||
|
|
|
@ -11,7 +11,7 @@ categories = ["development-tools::testing", "no-std", "no-std::no-alloc"]
|
|||
|
||||
[dependencies]
|
||||
bitvec = { version = "1.0.1", default-features = false }
|
||||
extra-math = { git = "https://git.chir.rs/ProcyOS/extra_math.git", version = "0.1.0" }
|
||||
extra-math = { version = "0.1.0", registry = "procyos" }
|
||||
libm = "0.2.8"
|
||||
num-traits = { version = "0.2.19", default-features = false, features = [
|
||||
"libm",
|
||||
|
|
12
flake.lock
12
flake.lock
|
@ -14,16 +14,16 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713199118,
|
||||
"narHash": "sha256-MlLdAvk+zXCFUy280sY6LqtykqWXIkKVXo72J7a6HlU=",
|
||||
"owner": "cargo2nix",
|
||||
"lastModified": 1725812914,
|
||||
"narHash": "sha256-xYdN9kbpLScjJGll6IE7Cnnn1UhIMKUwGyrzKjQvPgI=",
|
||||
"owner": "DarkKirb",
|
||||
"repo": "cargo2nix",
|
||||
"rev": "1efb03f2f794ad5eed17e807e858c4da001dbc3e",
|
||||
"rev": "7bb1ee00029ab2e7bd8ba03f5563cdbb998ab6f7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cargo2nix",
|
||||
"ref": "main",
|
||||
"owner": "DarkKirb",
|
||||
"ref": "master",
|
||||
"repo": "cargo2nix",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
16
flake.nix
16
flake.nix
|
@ -12,7 +12,7 @@
|
|||
};
|
||||
|
||||
cargo2nix = {
|
||||
url = github:cargo2nix/cargo2nix/main;
|
||||
url = github:DarkKirb/cargo2nix/master;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
inputs.rust-overlay.follows = "rust-overlay";
|
||||
|
@ -36,6 +36,9 @@
|
|||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
registryDownloadPaths = {
|
||||
"sparse+https://git.chir.rs/api/packages/ProcyOS/cargo/" = "https://git.chir.rs/api/packages/ProcyOS/cargo/api/v1/crates";
|
||||
};
|
||||
rustPkgs = pkgs.rustBuilder.makePackageSet {
|
||||
packageFun = import ./Cargo.nix;
|
||||
rustChannel = "nightly";
|
||||
|
@ -45,6 +48,17 @@
|
|||
"rand_testsuite/default"
|
||||
"rand_testsuite/full"
|
||||
];
|
||||
fetchCrateAlternativeRegistry = {
|
||||
index,
|
||||
name,
|
||||
version,
|
||||
sha256,
|
||||
}:
|
||||
pkgs.fetchurl {
|
||||
name = "${name}-${version}.tar.gz";
|
||||
url = "${registryDownloadPaths.${index}}/${name}/${version}/download";
|
||||
inherit sha256;
|
||||
};
|
||||
};
|
||||
in rec {
|
||||
devShells.default = with pkgs;
|
||||
|
|
Loading…
Reference in a new issue