Revert "pkgs: use Rust from nixpkgs"

This reverts commit a235fdfced.
This commit is contained in:
Harsh Shandilya 2022-05-31 15:43:33 +05:30
parent 187206655d
commit f053f921b9
No known key found for this signature in database
GPG Key ID: 366D7BBAD1031E80
11 changed files with 46 additions and 31 deletions

View File

@ -1,23 +1,26 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs; {
let mkRustPlatform = import ./lib/mk-rust-platform.nix;
in with pkgs; {
lib = import ./lib { inherit pkgs; }; # functions
modules = import ./modules; # NixOS modules
overlays = import ./overlays; # nixpkgs overlays
adb-sync = callPackage ./pkgs/adb-sync { };
adx = callPackage ./pkgs/adx { };
argc = callPackage ./pkgs/argc { };
adx = callPackage ./pkgs/adx { inherit mkRustPlatform; };
argc = callPackage ./pkgs/argc { inherit mkRustPlatform; };
bundletool-bin = callPackage ./pkgs/bundletool-bin { };
clipboard-substitutor = callPackage ./pkgs/clipboard-substitutor { };
comma = callPackage ./pkgs/comma { };
clipboard-substitutor =
callPackage ./pkgs/clipboard-substitutor { inherit mkRustPlatform; };
comma = callPackage ./pkgs/comma { inherit mkRustPlatform; };
diffuse-bin = callPackage ./pkgs/diffuse-bin { };
gdrive = callPackage ./pkgs/gdrive { };
hcctl = callPackage ./pkgs/hcctl { };
healthchecks-monitor = callPackage ./pkgs/healthchecks-monitor { };
hcctl = callPackage ./pkgs/hcctl { inherit mkRustPlatform; };
healthchecks-monitor =
callPackage ./pkgs/healthchecks-monitor { inherit mkRustPlatform; };
jetbrains-mono-nerdfonts = callPackage ./pkgs/jetbrains-mono-nerdfonts { };
jless = callPackage ./pkgs/jless { };
katbin = callPackage ./pkgs/katbin { };
jless = callPackage ./pkgs/jless { inherit mkRustPlatform; };
katbin = callPackage ./pkgs/katbin { inherit mkRustPlatform; };
pidcat = callPackage ./pkgs/pidcat { };
when = callPackage ./pkgs/when { };
when = callPackage ./pkgs/when { inherit mkRustPlatform; };
}

12
lib/mk-rust-platform.nix Normal file
View File

@ -0,0 +1,12 @@
let
rustOverlay = import (builtins.fetchTarball {
url =
"https://github.com/oxalica/rust-overlay/archive/d477108aefccc46e4b7acc8008f03d4e823da7b0.tar.gz";
sha256 = "sha256-rTpgRsgIeCYY4e4Qj+gMT1H80E0f7ITNyseOaPSiyrM=";
});
pkgs = import <nixpkgs> { overlays = [ rustOverlay ]; };
rustSpecific = pkgs.rust-bin.stable.latest.default;
in pkgs.makeRustPlatform {
cargo = rustSpecific;
rustc = rustSpecific;
}

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, rustPlatform, pkg-config, pkgs ? import <nixpkgs> { }
}:
{ stdenv, fetchFromGitHub, mkRustPlatform, pkg-config
, pkgs ? import <nixpkgs> { } }:
rustPlatform.buildRustPackage rec {
mkRustPlatform.buildRustPackage rec {
pname = "adx";
version = "4.3.0";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, rustPlatform, pkgs ? import <nixpkgs> { } }:
{ stdenv, fetchFromGitHub, mkRustPlatform, pkgs ? import <nixpkgs> { } }:
rustPlatform.buildRustPackage rec {
mkRustPlatform.buildRustPackage rec {
pname = "argc";
version = "0.4.0";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkg-config, pkgs ? import <nixpkgs> { }, rustPlatform
}:
{ stdenv, fetchFromGitHub, pkg-config, pkgs ? import <nixpkgs> { }
, mkRustPlatform }:
rustPlatform.buildRustPackage rec {
mkRustPlatform.buildRustPackage rec {
pname = "clipboard-substitutor";
version = "0.6.0";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, rustPlatform, pkgs ? import <nixpkgs> { } }:
{ stdenv, fetchFromGitHub, mkRustPlatform, pkgs ? import <nixpkgs> { } }:
rustPlatform.buildRustPackage rec {
mkRustPlatform.buildRustPackage rec {
pname = "comma";
version = "1.2.0";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config
{ stdenv, fetchFromGitHub, mkRustPlatform, openssl, pkg-config
, pkgs ? import <nixpkgs> { } }:
rustPlatform.buildRustPackage rec {
mkRustPlatform.buildRustPackage rec {
pname = "hcctl";
version = "2.0.1";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config
{ stdenv, fetchFromGitHub, mkRustPlatform, openssl, pkg-config
, pkgs ? import <nixpkgs> { } }:
rustPlatform.buildRustPackage rec {
mkRustPlatform.buildRustPackage rec {
pname = "healthchecks-monitor";
version = "3.0.0";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkg-config, rustPlatform, pkgs ? import <nixpkgs> { }
}:
{ stdenv, fetchFromGitHub, pkg-config, mkRustPlatform
, pkgs ? import <nixpkgs> { } }:
rustPlatform.buildRustPackage rec {
mkRustPlatform.buildRustPackage rec {
pname = "jless";
version = "0.8.0";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, rustPlatform, pkgs ? import <nixpkgs> { } }:
{ stdenv, fetchFromGitHub, mkRustPlatform, pkgs ? import <nixpkgs> { } }:
rustPlatform.buildRustPackage rec {
mkRustPlatform.buildRustPackage rec {
pname = "katbin";
version = "1.2.1";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchgit, rustPlatform, pkg-config, pkgs ? import <nixpkgs> { } }:
{ stdenv, fetchgit, mkRustPlatform, pkg-config, pkgs ? import <nixpkgs> { } }:
rustPlatform.buildRustPackage rec {
mkRustPlatform.buildRustPackage rec {
pname = "when";
version = "0.4.0";