about summary refs log tree commit diff stats
path: root/rust/toolchain.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-05-27 16:47:17 +0200
committerSoispha <soispha@vhack.eu>2023-05-27 16:47:17 +0200
commit1f263a83a6f7d7dd1898326b04b2491b78e845b1 (patch)
treee56f9e121b8d904033fc9b21065ab0c9b242fb74 /rust/toolchain.nix
parentChore: Initial Commit (diff)
downloadflake-templates-1f263a83a6f7d7dd1898326b04b2491b78e845b1.tar.gz
flake-templates-1f263a83a6f7d7dd1898326b04b2491b78e845b1.zip
Feat(rust): Update
Diffstat (limited to '')
-rw-r--r--rust/toolchain.nix57
1 files changed, 0 insertions, 57 deletions
diff --git a/rust/toolchain.nix b/rust/toolchain.nix
deleted file mode 100644
index 5fdb336..0000000
--- a/rust/toolchain.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{
-  description = "Build a cargo project with a custom toolchain";
-
-  inputs = {
-    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
-    flake-utils.url = "github:numtide/flake-utils";
-
-    crane = {
-      url = "github:ipetkov/crane";
-      inputs = {
-        inputs.nixpkgs.follows = "nixpkgs";
-        flake-utils.follows = "flake-utils";
-      };
-    };
-
-    rust-overlay = {
-      url = "github:oxalica/rust-overlay";
-      inputs = {
-        nixpkgs.follows = "nixpkgs";
-        flake-utils.follows = "flake-utils";
-      };
-    };
-  };
-
-  outputs = {
-    self,
-    nixpkgs,
-    crane,
-    flake-utils,
-    rust-overlay,
-    ...
-  }:
-    flake-utils.lib.eachDefaultSystem (system: let
-      pkgs = import nixpkgs {
-        inherit system;
-        overlays = [(import rust-overlay)];
-      };
-
-      craneLib = (crane.mkLib pkgs).overrideToolchain (pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default)); # TODO select toolchain
-
-      craneBuild = craneLib.buildPackage {
-        src = craneLib.cleanCargoSource ./.;
-
-        doCheck = true;
-      };
-      appName = ""; # TODO fill
-    in {
-      packages.default = craneBuild;
-
-      app.default = {
-        type = "app";
-        program = "${self.packages.${system}.default}/bin/${appName}";
-      };
-    });
-}
-# vim: ts=2
-