about summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-05-24 15:21:36 +0300
committerVika <vika@fireburn.ru>2022-05-24 16:30:44 +0300
commit2f93873122b47e42f7ee1c38f1f04d052a63599c (patch)
tree9f3b17e7210301053367ccc1a134e7e962866db3 /flake.nix
parentb1c197aa75fd7f5c1a2982d3ab2933fb98fad474 (diff)
flake.nix: use rustc from nixpkgs every time
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix26
1 files changed, 5 insertions, 21 deletions
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 = "<kittybox package from the official flake>";
+            defaultText = "<kittybox package from the upstream flake>";
             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
       ];
     };
   });