From f0c99df51cd9dacb273300ed1ccbc0f02839761f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Thu, 19 Jan 2023 09:08:19 +0100 Subject: [PATCH] fix: nixOS files --- .envrc | 2 +- flake.lock | 43 +++++++++++++++++++++++++++++++++++++++++++ flake.nix | 24 ++++++++++++++++++++++++ shell.nix | 12 ------------ 4 files changed, 68 insertions(+), 13 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix delete mode 100644 shell.nix diff --git a/.envrc b/.envrc index 1d953f4..3550a30 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use nix +use flake diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..da7649b --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1673796341, + "narHash": "sha256-1kZi9OkukpNmOaPY7S5/+SlCDOuYnP3HkXHvNDyLQcc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6dccdc458512abce8d19f74195bb20fdb067df50", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..63dbade --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "Proj APP"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + poetry + python3 + (python310Packages.opencv4.override { + enableGtk2 = true; + gtk2 = pkgs.gtk2; + }) + ]; + }; + }); +} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 03ddbbf..0000000 --- a/shell.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs ? import { } }: - -pkgs.mkShell { - buildInputs = with pkgs; [ - poetry - python3 - (python310Packages.opencv4.override { - enableGtk2 = true; - gtk2 = pkgs.gtk2; - }) - ]; -}