From b8d94dfd4cacc956938b8ece382c2c0871ea7e48 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Tue, 19 Jul 2022 18:05:50 +0200 Subject: [PATCH] =?UTF-8?q?initialisation,=20cr=C3=A9ation=20de=20flake.ni?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 38 ++++++++++++++ 2 files changed, 182 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..4ab6f52 --- /dev/null +++ b/flake.lock @@ -0,0 +1,144 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1649676176, + "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1656065134, + "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nix-dart": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "pub2nix": "pub2nix" + }, + "locked": { + "lastModified": 1658242630, + "narHash": "sha256-3NFNg7odtLocBiYTwdL1c+BbHY82yC2h/pp0YZlyxpM=", + "ref": "main", + "rev": "8e49967105dc1f24798603a5b2affebdf05a9c8d", + "revCount": 311, + "type": "git", + "url": "file:///home/florent/src/nix-dart" + }, + "original": { + "type": "git", + "url": "file:///home/florent/src/nix-dart" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1652133925, + "narHash": "sha256-kfATGChLe9/fQVZkXN9G71JAVMlhePv1qDbaRKklkQs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "51d859cdab1ef58755bd342d45352fc607f5e59b", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1658161305, + "narHash": "sha256-X/nhnMCa1Wx4YapsspyAs6QYz6T/85FofrI6NpdPDHg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e4d49de45a3b5dbcb881656b4e3986e666141ea9", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1656401090, + "narHash": "sha256-bUS2nfQsvTQW2z8SK7oEFSElbmoBahOPtbXPm0AL3I4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "16de63fcc54e88b9a106a603038dd5dd2feb21eb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pub2nix": { + "flake": false, + "locked": { + "lastModified": 1594192744, + "narHash": "sha256-pDvcXSG1Mh2BpwkqAcNDJzcupV3pIAAtZJLfkiHMAz4=", + "owner": "paulyoung", + "repo": "pub2nix", + "rev": "0c7ecca590fcd1616db8c6468f799ffef36c85e9", + "type": "github" + }, + "original": { + "owner": "paulyoung", + "repo": "pub2nix", + "type": "github" + } + }, + "root": { + "inputs": { + "nix-dart": "nix-dart", + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1658199402, + "narHash": "sha256-R/Zp+fQ6e0iVTOgcZuXFtnD9O6yjxgdHmCtp3g+zz78=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "6c4ea1e705e497e064ab82fb90ad99a50b15aba8", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..239623b --- /dev/null +++ b/flake.nix @@ -0,0 +1,38 @@ +{ + description = "trunk setup"; + + inputs = { + nix-dart.url = "/home/florent/src/nix-dart"; + nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; }; + rust-overlay = { url = "github:oxalica/rust-overlay"; }; + }; + + outputs = { nixpkgs, rust-overlay, nix-dart, ... }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { + inherit system; + overlays = [ rust-overlay.overlays.default nix-dart.overlay ]; + }; + + in { + devShell.${system} = let + in pkgs.mkShell { + buildInputs = with pkgs; [ + cargo + wasm-bindgen-cli + trunk + nodePackages.sass + + (rust-bin.stable.latest.default.override { + extensions = [ "rust-src" ]; + targets = [ "wasm32-unknown-unknown" ]; + }) + + # ( ) + ]; + + shellHook = ""; + }; + }; +}