This commit is contained in:
nora 2024-02-23 21:14:32 +01:00
parent 08213ec050
commit 4d777ea5a4
7 changed files with 49 additions and 33 deletions

View file

@ -5,11 +5,11 @@ pkgs: pkgs.rustPlatform.buildRustPackage {
src = pkgs.fetchFromGitHub {
owner = "rust-lang";
repo = "cargo-bisect-rustc";
rev = "7884b4120561d17e10ffabf6490d51b4e0ac3fd3"; # contains an unrelease fix for perf builds
hash = "sha256-BiqsDs/HTuQEjqRLnoYQzJADllqqiVL3m2AzamHd7IM=";
rev = "e61eb10bb7b5eacb1fe3244d18ccb059393d7fac";
hash = "sha256-rr0fU1Y5k2ScT8zpBz4VhMaUlbW/ze00ORz8dUNFIpI=";
};
cargoHash = "sha256-GzoJufms7ud3ZJxNHrrdmfYT7TSoTeAQNwBjptO59SA=";
cargoHash = "sha256-9UijUaLcJwFxkkrd91K9r1vq2fNtsTQvc+ZWGaZQiNE=";
patches =
let

View file

@ -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";
};
}

View 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

View 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=";
}
]

View file

@ -1,6 +1,6 @@
pkgs: {
cargo-bisect-rustc = import ./cargo-bisect-rustc/default.nix pkgs;
cargo-mommy = import ./cargo-mommy.nix pkgs;
monaspace = import ./monaspace.nix pkgs;
x = import ./x pkgs;
}

View file

@ -1,13 +1,14 @@
{ pkgs, ... }:
let
customPkgs = import ../custom-pkgs/default.nix pkgs;
crates = import ../custom-pkgs/crates pkgs;
in
with pkgs; [
bacon
bat
cargo-cross
cargo-expand
cargo-mommy
cargo-nextest
customPkgs.cargo-mommy
dig
fzf
gcc
@ -18,9 +19,12 @@ with pkgs; [
htop
hyperfine
inferno
jq
p7zip
python3
ripgrep
rustup-toolchain-install-master
samply
]
tokei
uwuify
] ++ crates

View file

@ -31,7 +31,6 @@ in
home.packages = with pkgs; [
audacity
customPkgs.cargo-mommy
customPkgs.cargo-bisect-rustc
discord
jetbrains.idea-ultimate
@ -53,7 +52,7 @@ in
g = "git";
};
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"}";
};
};