From 2f93873122b47e42f7ee1c38f1f04d052a63599c Mon Sep 17 00:00:00 2001 From: Vika Date: Tue, 24 May 2022 15:21:36 +0300 Subject: flake.nix: use rustc from nixpkgs every time --- flake.nix | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 4de70c6..5eae2da 100644 --- a/flake.nix +++ b/flake.nix @@ -6,13 +6,6 @@ repo = "flake-utils"; ref = "master"; }; - rust = { - type = "github"; - owner = "oxalica"; - repo = "rust-overlay"; - ref = "master"; - inputs.nixpkgs.follows = "nixpkgs"; - }; naersk = { type = "github"; owner = "nmattia"; @@ -21,7 +14,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, rust, flake-utils, naersk }: let + outputs = { self, nixpkgs, flake-utils, naersk }: let supportedSystems = ["aarch64-linux" "x86_64-linux"]; forAllSystems = f: flake-utils.lib.eachSystem supportedSystems f; in { @@ -40,7 +33,7 @@ package = mkOption { type = types.package; default = self.packages.${config.nixpkgs.localSystem.system}.kittybox; - defaultText = ""; + defaultText = ""; description = "Which Kittybox derivation to use."; }; @@ -181,22 +174,13 @@ }; }; } // forAllSystems (system: let - pkgs = import nixpkgs { - localSystem.system = system; - overlays = [ rust.overlay ]; - }; - rust-bin = pkgs.rust-bin.stable.latest; + pkgs = nixpkgs.legacyPackages.${system}; packages = { kittybox = { stdenv, lib, runCommandNoCC, openssl, zlib, pkg-config, protobuf, naersk-lib, lld, mold }: naersk-lib.buildPackage { pname = "kittybox"; version = "0.1.0"; - /*src = builtins.filterSource (name: type: builtins.elem (builtins.elemAt (lib.splitString "/" name) 4) [ - "Cargo.toml" "Cargo.lock" - "src" "templates" "util" - "fonts" - ]) ./.;*/ src = runCommandNoCC "kittybox-src" {} '' mkdir -p $out cp -r ${./Cargo.toml} $out/Cargo.toml @@ -316,13 +300,13 @@ name = "rust-dev-shell"; nativeBuildInputs = with pkgs; [ + # required for tokio-console's console-subscriber pkg-config protobuf # required for httpmock, not actually used in the release openssl.dev zlib xh systemfd tokio-console cargo-watch cargo-edit cargo-outdated - (rust-bin.default.override { extensions = [ "rust-src" ]; }) - (rust-analyzer.override { rustPlatform = with rust-bin; { rustLibSrc = rust-src; }; }) + rustc cargo rust-analyzer clippy ]; }; }); -- cgit 1.4.1