From 46a58381d559323d9d9cb770c187d21f8f106a66 Mon Sep 17 00:00:00 2001 From: Thomas Heck Date: Thu, 24 Dec 2020 11:30:40 +0100 Subject: [PATCH] (nix): upgrade to flakes --- flake.lock | 42 ++++++++++++++++++++++++++++++++++++++++++ flake.nix | 28 ++++++++++++++++++++++++++++ shell.nix | 15 --------------- 3 files changed, 70 insertions(+), 15 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix delete mode 100644 shell.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..22829a4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1605370193, + "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5021eac20303a61fafe17224c087f5519baed54d", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1608633860, + "narHash": "sha256-AGJfdJCR5jfIt8PqGiENXRqhthrS3Gxy8Wzb3Z2GsS4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "da1b28ab8f361fbe14dc539cd69ce1bfd015fd68", + "type": "github" + }, + "original": { + "owner": "NixOS", + "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..a56c417 --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + description = "crdt-enc"; + + inputs = { + nixpkgs.url = github:NixOS/nixpkgs; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, flake-utils, nixpkgs }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in { + devShell = pkgs.stdenv.mkDerivation { + name = "crdt-enc"; + buildInputs = [ + pkgs.gpgme + pkgs.libsodium + + pkgs.cargo + pkgs.rustc + pkgs.rustfmt + pkgs.rust-analyzer + ]; + }; + } + ); +} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 615021c..0000000 --- a/shell.nix +++ /dev/null @@ -1,15 +0,0 @@ -let - pkgs = import {}; -in - pkgs.stdenv.mkDerivation { - name = "crdt-enc"; - buildInputs = [ - pkgs.gpgme - pkgs.libsodium - - pkgs.cargo - pkgs.rustc - pkgs.rustfmt - pkgs.rust-analyzer - ]; - }