From 2f44047c4935233509def7105bcf96daa636d700 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 11 Mar 2025 03:34:50 +0000 Subject: [PATCH] add a flake for developing with nix --- flake.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 22 ++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..96764b4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1741462378, + "narHash": "sha256-ZF3YOjq+vTcH51S+qWa1oGA9FgmdJ67nTNPG2OIlXDc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2d9e4457f8e83120c9fdf6f1707ed0bc603e5ac9", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixpkgs-unstable", + "type": "indirect" + } + }, + "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..35b0083 --- /dev/null +++ b/flake.nix @@ -0,0 +1,22 @@ +{ + inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = github:numtide/flake-utils; + + outputs = { self, nixpkgs, flake-utils }: + with flake-utils.lib; + eachSystem allSystems (system: + let + pkgs = import nixpkgs { inherit system; }; + python3 = (pkgs.python3.withPackages (ps: with ps; [ + alive-progress + scapy + ])).override { + ignoreCollisions = true; + }; + in { + devShells.default = with pkgs; mkShell { + packages = [ python3 ]; + }; + } + ); +}