about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--flake.lock74
-rw-r--r--flake.nix74
2 files changed, 10 insertions, 138 deletions
diff --git a/flake.lock b/flake.lock
index ea926e5..ecb4818 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,41 +1,5 @@
 {
   "nodes": {
-    "crane": {
-      "inputs": {
-        "nixpkgs": [
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1711681752,
-        "narHash": "sha256-LEg6/dmEFxx6Ygti5DO9MOhGNpyB7zdxdWtzv/FCTXk=",
-        "owner": "ipetkov",
-        "repo": "crane",
-        "rev": "ada0fb4dcce4561acb1eb17c59b7306d9d4a95f3",
-        "type": "github"
-      },
-      "original": {
-        "owner": "ipetkov",
-        "repo": "crane",
-        "type": "github"
-      }
-    },
-    "flake-compat": {
-      "flake": false,
-      "locked": {
-        "lastModified": 1696426674,
-        "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
-        "owner": "edolstra",
-        "repo": "flake-compat",
-        "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
-        "type": "github"
-      },
-      "original": {
-        "owner": "edolstra",
-        "repo": "flake-compat",
-        "type": "github"
-      }
-    },
     "flake-utils": {
       "inputs": {
         "systems": [
@@ -58,11 +22,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1711715736,
-        "narHash": "sha256-9slQ609YqT9bT/MNX9+5k5jltL9zgpn36DpFB7TkttM=",
+        "lastModified": 1716619601,
+        "narHash": "sha256-9dUxZf8MOqJH3vjbhrz7LH4qTcnRsPSBU1Q50T7q/X8=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "807c549feabce7eddbf259dbdcec9e0600a0660d",
+        "rev": "47e03a624662ce399e55c45a5f6da698fc72c797",
         "type": "github"
       },
       "original": {
@@ -74,38 +38,12 @@
     },
     "root": {
       "inputs": {
-        "crane": "crane",
-        "flake-compat": "flake-compat",
         "flake-utils": "flake-utils",
         "nixpkgs": "nixpkgs",
-        "rust-overlay": "rust-overlay",
         "systems": "systems",
         "treefmt-nix": "treefmt-nix"
       }
     },
-    "rust-overlay": {
-      "inputs": {
-        "flake-utils": [
-          "flake-utils"
-        ],
-        "nixpkgs": [
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1711851236,
-        "narHash": "sha256-EJ03x3N9ihhonAttkaCrqxb0djDq3URCuDpmVPbNZhA=",
-        "owner": "oxalica",
-        "repo": "rust-overlay",
-        "rev": "f258266af947599e8069df1c2e933189270f143a",
-        "type": "github"
-      },
-      "original": {
-        "owner": "oxalica",
-        "repo": "rust-overlay",
-        "type": "github"
-      }
-    },
     "systems": {
       "locked": {
         "lastModified": 1680978846,
@@ -128,11 +66,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1711803027,
-        "narHash": "sha256-Qic3OvsVLpetchzaIe2hJqgliWXACq2Oee6mBXa/IZQ=",
+        "lastModified": 1715940852,
+        "narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=",
         "owner": "numtide",
         "repo": "treefmt-nix",
-        "rev": "1810d51a015c1730f2fe05a255258649799df416",
+        "rev": "2fba33a182602b9d49f0b2440513e5ee091d838b",
         "type": "github"
       },
       "original": {
diff --git a/flake.nix b/flake.nix
index 0e2472a..bc8eedb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -11,28 +11,10 @@
       };
     };
 
-    crane = {
-      url = "github:ipetkov/crane";
-      inputs = {
-        nixpkgs.follows = "nixpkgs";
-      };
-    };
-    rust-overlay = {
-      url = "github:oxalica/rust-overlay";
-      inputs = {
-        nixpkgs.follows = "nixpkgs";
-        flake-utils.follows = "flake-utils";
-      };
-    };
-
     # inputs for following
     systems = {
       url = "github:nix-systems/x86_64-linux"; # only evaluate for this system
     };
-    flake-compat = {
-      url = "github:edolstra/flake-compat";
-      flake = false;
-    };
     flake-utils = {
       url = "github:numtide/flake-utils";
       inputs = {
@@ -46,64 +28,19 @@
     nixpkgs,
     flake-utils,
     treefmt-nix,
-    crane,
-    rust-overlay,
     ...
   }:
     flake-utils.lib.eachDefaultSystem (system: let
-      pkgs = import nixpkgs {
-        inherit system;
-        overlays = [(import rust-overlay)];
-      };
-
-      nightly = false;
-      rust_minimal =
-        if nightly
-        then pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal)
-        else pkgs.rust-bin.stable.latest.minimal;
-      rust_default =
-        if nightly
-        then pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default)
-        else pkgs.rust-bin.stable.latest.default;
-
-      cargo_toml = craneLib.cleanCargoToml {cargoToml = ./Cargo.toml;};
-      pname = cargo_toml.package.name;
-
-      craneLib = (crane.mkLib pkgs).overrideToolchain rust_minimal;
-      craneBuild = craneLib.buildPackage {
-        src = craneLib.cleanCargoSource ./.;
-
-        doCheck = true;
-      };
-
-      manual = pkgs.stdenv.mkDerivation {
-        name = "${pname}-manual";
-        inherit (cargo_toml.package) version;
-
-        src = ./docs;
-        nativeBuildInputs = with pkgs; [pandoc];
-
-        buildPhase = ''
-          mkdir --parents $out/docs;
-
-          pandoc "./${pname}.1.md" -s -t man > $out/docs/${pname}.1
-        '';
-
-        installPhase = ''
-          install -D $out/docs/${pname}.1  $out/share/man/man1/${pname};
-        '';
-      };
+      pkgs = nixpkgs.legacyPackages.${system};
 
       treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;};
     in {
-      packages.default = pkgs.symlinkJoin {
-        inherit (cargo_toml.package) name;
-
-        paths = [manual craneBuild];
+      packages = {
+        # TODO(@bpeetz): Support the 'simple' wkd configuration <2024-05-25>
+        default = ./src;
       };
 
       checks = {
-        inherit craneBuild;
         formatting = treefmtEval.config.build.check self;
       };
 
@@ -113,9 +50,6 @@
         packages = with pkgs; [
           cocogitto
 
-          rust_default
-          cargo-edit
-
           licensure
         ];
       };