From 6d53b3b8e8d239d8893529a62293ac2b60635ec9 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Wed, 14 Feb 2024 21:54:21 +0100 Subject: [PATCH] Add nix flake for dev shell --- .gitignore | 2 ++ flake.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 24 +++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore index 2f7896d..937ac4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ target/ +.envrc +.direnv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..b360569 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1707877513, + "narHash": "sha256-sp0w2apswd3wv0sAEF7StOGHkns3XUQaO5erhWFZWXk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "89653a03e0915e4a872788d10680e7eec92f8600", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "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 new file mode 100644 index 0000000..4548d1a --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "Terminal session recorder"; + + inputs = { + nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable; + flake-utils.url = github:numtide/flake-utils; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + (system: + let pkgs = nixpkgs.legacyPackages.${system}; in + { + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + rustup + ] ++ (lib.optionals stdenv.isDarwin [ + libiconv + darwin.apple_sdk.frameworks.Foundation + ]); + }; + } + ); +}