mirror of
https://github.com/Noratrieb/nixos.git
synced 2026-01-14 19:55:08 +01:00
crates
This commit is contained in:
parent
08213ec050
commit
4d777ea5a4
7 changed files with 49 additions and 33 deletions
|
|
@ -5,11 +5,11 @@ pkgs: pkgs.rustPlatform.buildRustPackage {
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "rust-lang";
|
owner = "rust-lang";
|
||||||
repo = "cargo-bisect-rustc";
|
repo = "cargo-bisect-rustc";
|
||||||
rev = "7884b4120561d17e10ffabf6490d51b4e0ac3fd3"; # contains an unrelease fix for perf builds
|
rev = "e61eb10bb7b5eacb1fe3244d18ccb059393d7fac";
|
||||||
hash = "sha256-BiqsDs/HTuQEjqRLnoYQzJADllqqiVL3m2AzamHd7IM=";
|
hash = "sha256-rr0fU1Y5k2ScT8zpBz4VhMaUlbW/ze00ORz8dUNFIpI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoHash = "sha256-GzoJufms7ud3ZJxNHrrdmfYT7TSoTeAQNwBjptO59SA=";
|
cargoHash = "sha256-9UijUaLcJwFxkkrd91K9r1vq2fNtsTQvc+ZWGaZQiNE=";
|
||||||
|
|
||||||
patches =
|
patches =
|
||||||
let
|
let
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
# copied from https://github.com/NixOS/nixpkgs/blob/d4b5a67bbe9ef750bd2fdffd4cad400dd5553af8/pkgs/development/tools/rust/cargo-mommy/default.nix#L15
|
|
||||||
{ lib, rustPlatform, fetchFromGitHub, ... }:
|
|
||||||
|
|
||||||
rustPlatform.buildRustPackage {
|
|
||||||
pname = "cargo-mommy";
|
|
||||||
version = "0.3.1";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "Gankra";
|
|
||||||
repo = "cargo-mommy";
|
|
||||||
rev = "0ec17361d8b0573d0155984403e576b788abeb60";
|
|
||||||
hash = "sha256-Mf0VGxQ90PjNhFA2OnDIFkNZjYDCuMqPsexqy5+gRdI=";
|
|
||||||
};
|
|
||||||
|
|
||||||
cargoSha256 = "sha256-iQt6eTCcpzhFnrDkUmT4x7JX+Z7fWdW5ovbB/9Ui7Sw=";
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Cargo wrapper that encourages you after running commands";
|
|
||||||
homepage = "https://github.com/Gankra/cargo-mommy";
|
|
||||||
license = with licenses; [ mit asl20 ];
|
|
||||||
maintainers = with maintainers; [ GoldsteinE ];
|
|
||||||
mainProgram = "cargo-mommy";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
23
custom-pkgs/crates/default.nix
Normal file
23
custom-pkgs/crates/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
pkgs:
|
||||||
|
let
|
||||||
|
crates = import ./list.nix pkgs;
|
||||||
|
in
|
||||||
|
builtins.map
|
||||||
|
(crate: pkgs.rustPlatform.buildRustPackage {
|
||||||
|
pname = crate.pname;
|
||||||
|
version = crate.version;
|
||||||
|
src = pkgs.fetchCrate {
|
||||||
|
pname = crate.pname;
|
||||||
|
version = crate.version;
|
||||||
|
hash = crate.downloadHash;
|
||||||
|
};
|
||||||
|
cargoHash = crate.cargoHash;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "${crate.pname} crate from crates.io";
|
||||||
|
homepage = "https://crates.io/crates/${crate.pname}";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
crates
|
||||||
|
|
||||||
14
custom-pkgs/crates/list.nix
Normal file
14
custom-pkgs/crates/list.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
pkgs: [
|
||||||
|
{
|
||||||
|
pname = "cargo-dl";
|
||||||
|
version = "0.1.4";
|
||||||
|
downloadHash = "sha256-txSRmOr3tYw72xI5Dqt/y1EboaqFWEMN+lASVXLNdgQ=";
|
||||||
|
cargoHash = "sha256-mkRZtC6JjsJxQ4DTjS2qw2y1opFIMt39eEMR1DurgAM=";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
pname = "counts";
|
||||||
|
version = "1.0.4";
|
||||||
|
downloadHash = "sha256-zLQHUHo3e/nY5UHhX03nK/gr+0rap/bSSlX7HDzr9uo=";
|
||||||
|
cargoHash = "sha256-DVuIPO/dCk5rvPBzfM8lGGvM1ZZUUBgN7jSr/ZRGUwE=";
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
pkgs: {
|
pkgs: {
|
||||||
cargo-bisect-rustc = import ./cargo-bisect-rustc/default.nix pkgs;
|
cargo-bisect-rustc = import ./cargo-bisect-rustc/default.nix pkgs;
|
||||||
cargo-mommy = import ./cargo-mommy.nix pkgs;
|
|
||||||
monaspace = import ./monaspace.nix pkgs;
|
monaspace = import ./monaspace.nix pkgs;
|
||||||
x = import ./x pkgs;
|
x = import ./x pkgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
customPkgs = import ../custom-pkgs/default.nix pkgs;
|
crates = import ../custom-pkgs/crates pkgs;
|
||||||
in
|
in
|
||||||
with pkgs; [
|
with pkgs; [
|
||||||
bacon
|
bacon
|
||||||
bat
|
bat
|
||||||
|
cargo-cross
|
||||||
cargo-expand
|
cargo-expand
|
||||||
|
cargo-mommy
|
||||||
cargo-nextest
|
cargo-nextest
|
||||||
customPkgs.cargo-mommy
|
|
||||||
dig
|
dig
|
||||||
fzf
|
fzf
|
||||||
gcc
|
gcc
|
||||||
|
|
@ -18,9 +19,12 @@ with pkgs; [
|
||||||
htop
|
htop
|
||||||
hyperfine
|
hyperfine
|
||||||
inferno
|
inferno
|
||||||
|
jq
|
||||||
p7zip
|
p7zip
|
||||||
python3
|
python3
|
||||||
ripgrep
|
ripgrep
|
||||||
rustup-toolchain-install-master
|
rustup-toolchain-install-master
|
||||||
samply
|
samply
|
||||||
]
|
tokei
|
||||||
|
uwuify
|
||||||
|
] ++ crates
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ in
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
audacity
|
audacity
|
||||||
customPkgs.cargo-mommy
|
|
||||||
customPkgs.cargo-bisect-rustc
|
customPkgs.cargo-bisect-rustc
|
||||||
discord
|
discord
|
||||||
jetbrains.idea-ultimate
|
jetbrains.idea-ultimate
|
||||||
|
|
@ -53,7 +52,7 @@ in
|
||||||
g = "git";
|
g = "git";
|
||||||
};
|
};
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
x = "CARGO_MOMMYS_ACTUAL=${lib.getExe customPkgs.x} ${lib.getExe customPkgs.cargo-mommy}";
|
x = "CARGO_MOMMYS_ACTUAL=${lib.getExe customPkgs.x} ${lib.getExe' pkgs.cargo-mommy "cargo-mommy"}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue