Skip to content

Commit

Permalink
[regenerated/updated] crate2nix itself
Browse files Browse the repository at this point in the history
  • Loading branch information
kolloch committed Oct 15, 2023
1 parent cac575b commit 68ec88c
Show file tree
Hide file tree
Showing 8 changed files with 770 additions and 598 deletions.
391 changes: 199 additions & 192 deletions crate2nix/Cargo.lock

Large diffs are not rendered by default.

917 changes: 537 additions & 380 deletions crate2nix/Cargo.nix

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions crate2nix/templates/nix/crate2nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ rec {
buildRustCrateForPkgsFunc pkgs
(
crateConfig // {
# https://github.com/NixOS/nixpkgs/issues/218712
dontStrip = stdenv.hostPlatform.isDarwin;
src = crateConfig.src or (
pkgs.fetchurl rec {
name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz";
Expand Down
34 changes: 17 additions & 17 deletions nix/dependencies.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
cargo clippy rustc rustfmt
binutils
nixpkgs-fmt jq
nix
niv
nix_2_3
git
utillinux
cacert
Expand All @@ -29,22 +29,22 @@
in
cargoNix.rootCrate.build;

cargoRelease =
let
cargoNixSource = tools.generatedCargoNix rec {
name = "cargo-release";
src = sources."${name}";
};
buildRustCrateForPkgs = pkgs: pkgs.buildRustCrate.override {
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
cargo-release = { buildInputs ? [ ], ... }: {
buildInputs = buildInputs ++ [ pkgs.openssl ];
};
};
};
cargoNix = pkgs.callPackage cargoNixSource { inherit buildRustCrateForPkgs; };
in
cargoNix.rootCrate.build;
# cargoRelease =
# let
# cargoNixSource = tools.generatedCargoNix rec {
# name = "cargo-release";
# src = sources."${name}";
# };
# buildRustCrateForPkgs = pkgs: pkgs.buildRustCrate.override {
# defaultCrateOverrides = pkgs.defaultCrateOverrides // {
# cargo-release = { buildInputs ? [ ], ... }: {
# buildInputs = buildInputs ++ [ pkgs.openssl ];
# };
# };
# };
# cargoNix = pkgs.callPackage cargoNixSource { inherit buildRustCrateForPkgs; };
# in
# cargoNix.rootCrate.build;

} // pkgs.lib.optionalAttrs pkgs.stdenv.isDarwin {

Expand Down
18 changes: 9 additions & 9 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"homepage": "",
"owner": "sunng87",
"repo": "cargo-release",
"rev": "d23016fa0e39cad77387ca458d830482487a54f3",
"sha256": "0frbbikls1w6cy8bk1bdkdvwk0zp38jij957iyjb7mppqa5snar7",
"rev": "ae209d19217685b6dc129104b8242f5979e33aa8",
"sha256": "1wpzhkplhvmcw0rvjlamllx9ahjgldy1rsb6gljwn6a8hk56zlaj",
"type": "tarball",
"url": "https://github.com/sunng87/cargo-release/archive/d23016fa0e39cad77387ca458d830482487a54f3.tar.gz",
"url": "https://github.com/sunng87/cargo-release/archive/ae209d19217685b6dc129104b8242f5979e33aa8.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"crate2nix": {
Expand All @@ -29,10 +29,10 @@
"homepage": "",
"owner": "kolloch",
"repo": "crate2nix",
"rev": "0b9d4bca508bd65b1845f1be3de2842f6840d4e6",
"sha256": "0nh831l5v58dy0nljgjcsx6q3806136s4ndlxbz2k3vq5q3dj58r",
"rev": "28ff0ed13ad4ddb42954625c10f68e21f8e084fa",
"sha256": "0wgkla6aapj599c3aazkm55mp8m65sv6w3plb9fqdbzn8hk1a868",
"type": "tarball",
"url": "https://github.com/kolloch/crate2nix/archive/0b9d4bca508bd65b1845f1be3de2842f6840d4e6.tar.gz",
"url": "https://github.com/kolloch/crate2nix/archive/28ff0ed13ad4ddb42954625c10f68e21f8e084fa.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nix-test-runner": {
Expand All @@ -53,10 +53,10 @@
"homepage": "https://github.com/NixOS/nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d9f759f2ea8d265d974a6e1259bd510ac5844c5d",
"sha256": "1r0jjdgx206vgmjqry82qv01cbmafiqwcmqxlnzmhsbzkcgrlnzh",
"rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593",
"sha256": "13dfm5z6r37s7qxryr8jrqinz0xw4i7r0p4y3kpq64a2bwa5rlpl",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/d9f759f2ea8d265d974a6e1259bd510ac5844c5d.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/5e4c2ada4fcd54b99d56d7bd62f384511a7e2593.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-mozilla": {
Expand Down
2 changes: 2 additions & 0 deletions sample_projects/bin_with_git_submodule_dep/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1684,6 +1684,8 @@ rec {
buildRustCrateForPkgsFunc pkgs
(
crateConfig // {
# https://github.com/NixOS/nixpkgs/issues/218712
dontStrip = stdenv.hostPlatform.isDarwin;
src = crateConfig.src or (
pkgs.fetchurl rec {
name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz";
Expand Down
2 changes: 2 additions & 0 deletions sample_projects/codegen/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,8 @@ rec {
buildRustCrateForPkgsFunc pkgs
(
crateConfig // {
# https://github.com/NixOS/nixpkgs/issues/218712
dontStrip = stdenv.hostPlatform.isDarwin;
src = crateConfig.src or (
pkgs.fetchurl rec {
name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz";
Expand Down
2 changes: 2 additions & 0 deletions sample_projects/sub_dir_crates/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ rec {
buildRustCrateForPkgsFunc pkgs
(
crateConfig // {
# https://github.com/NixOS/nixpkgs/issues/218712
dontStrip = stdenv.hostPlatform.isDarwin;
src = crateConfig.src or (
pkgs.fetchurl rec {
name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz";
Expand Down

0 comments on commit 68ec88c

Please sign in to comment.