diff --git a/flake.lock b/flake.lock deleted file mode 100644 index e14a488..0000000 --- a/flake.lock +++ /dev/null @@ -1,106 +0,0 @@ -{ - "nodes": { - "crane": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1710886643, - "narHash": "sha256-saTZuv9YeZ9COHPuj8oedGdUwJZcbQ3vyRqe7NVJMsQ=", - "owner": "ipetkov", - "repo": "crane", - "rev": "5bace74e9a65165c918205cf67ad3977fe79c584", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1711001935, - "narHash": "sha256-URtGpHue7HHZK0mrHnSf8wJ6OmMKYSsoLmJybrOLFSQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "20f77aa09916374aa3141cbc605c955626762c9a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "crane": "crane", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1711073443, - "narHash": "sha256-PpNb4xq7U5Q/DdX40qe7CijUsqhVVM3VZrhN0+c6Lcw=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "eec55ba9fcde6be4c63942827247e42afef7fafe", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index e65ff52..0000000 --- a/flake.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ - inputs = { - flake-utils = { url = "github:numtide/flake-utils"; }; - nixpkgs = { url = "github:NixOS/nixpkgs/nixos-unstable"; }; - rust-overlay = - { - url = "github:oxalica/rust-overlay"; - inputs = { - nixpkgs.follows = "nixpkgs"; - flake-utils.follows = "flake-utils"; - }; - }; - crane = { - url = "github:ipetkov/crane"; - inputs = { - nixpkgs.follows = "nixpkgs"; - }; - }; - }; - outputs = - { self, nixpkgs, flake-utils, rust-overlay, crane }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ (import rust-overlay) ]; - }; - rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; - craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain; - src = craneLib.cleanCargoSource (craneLib.path ./.); - - buildInputs = with pkgs; [ pkgs.stdenv.cc.cc ]; - nativeBuildInputs = with pkgs; [ - rustToolchain - clang - mold - pkg-config - xz - ] - ++ lib.optionals pkgs.stdenv.isLinux [ autoPatchelfHook ] - ++ lib.optionals pkgs.stdenv.isDarwin - (with pkgs.darwin.apple_sdk.frameworks; [ - CoreFoundation - CoreServices - SystemConfiguration - Security - ]); - commonArgs = { - pname = "rc_zip"; - version = "latest"; - strictDeps = true; - dontStrip = true; - inherit src buildInputs nativeBuildInputs; - }; - cargoArtifacts = craneLib.buildDepsOnly commonArgs; - bin = craneLib.buildPackage (commonArgs // { - inherit cargoArtifacts; - }); - in - with pkgs; - { - packages = { - inherit bin; - default = bin; - }; - devShells.default = mkShell { - packages = with pkgs; [ just nixpkgs-fmt mold libiconv ]; - }; - } - ); -}