From 4e928702cf275c96d5ad51744494ef26816be6b6 Mon Sep 17 00:00:00 2001 From: Kody Low <74332828+Kodylow@users.noreply.github.com> Date: Thu, 30 Nov 2023 09:25:49 -0800 Subject: [PATCH] feat: add nix flake (#584) * feat: add nix flake * fix: local_data dir for dev * fix: remove fedimint nix flake parts --- .gitignore | 5 +- flake.lock | 500 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 19 ++ 3 files changed, 523 insertions(+), 1 deletion(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore index d152059a..03b17961 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,7 @@ lerna-debug.log* !.elasticbeanstalk/*.global.yml # config files -config.yaml \ No newline at end of file +config.yaml + +# For Dev +local_data diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..c4f8c2bc --- /dev/null +++ b/flake.lock @@ -0,0 +1,500 @@ +{ + "nodes": { + "advisory-db": { + "flake": false, + "locked": { + "lastModified": 1681141676, + "narHash": "sha256-U/lhe5kPY6JcitdPiPxt6O7n6rxH+zw/Ghl1w8C9dB8=", + "owner": "rustsec", + "repo": "advisory-db", + "rev": "c358dc290a6f3ccb7f889b53f4f26c0b5d18d2ff", + "type": "github" + }, + "original": { + "owner": "rustsec", + "repo": "advisory-db", + "type": "github" + } + }, + "android-nixpkgs": { + "inputs": { + "devshell": "devshell", + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "fedimint", + "flakebox", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1695500413, + "narHash": "sha256-yinrAWIc4XZbWQoXOYkUO0lCNQ5z/vMyl+QCYuIwdPc=", + "owner": "dpc", + "repo": "android-nixpkgs", + "rev": "2e42268a196375ce9b010a10ec5250d2f91a09b4", + "type": "github" + }, + "original": { + "owner": "dpc", + "repo": "android-nixpkgs", + "rev": "2e42268a196375ce9b010a10ec5250d2f91a09b4", + "type": "github" + } + }, + "crane": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils_3", + "nixpkgs": [ + "fedimint", + "flakebox", + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1697596235, + "narHash": "sha256-4VTrrTdoA1u1wyf15krZCFl3c29YLesSNioYEgfb2FY=", + "owner": "dpc", + "repo": "crane", + "rev": "c97a0c0d83bfdf01c29113c5592a3defc27cb315", + "type": "github" + }, + "original": { + "owner": "dpc", + "repo": "crane", + "rev": "c97a0c0d83bfdf01c29113c5592a3defc27cb315", + "type": "github" + } + }, + "devshell": { + "inputs": { + "nixpkgs": [ + "fedimint", + "flakebox", + "android-nixpkgs", + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1695195896, + "narHash": "sha256-pq9q7YsGXnQzJFkR5284TmxrLNFc0wo4NQ/a5E93CQU=", + "owner": "numtide", + "repo": "devshell", + "rev": "05d40d17bf3459606316e3e9ec683b784ff28f16", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "fedimint": { + "inputs": { + "advisory-db": "advisory-db", + "flake-utils": "flake-utils", + "flakebox": "flakebox", + "nixpkgs": "nixpkgs_2", + "nixpkgs-kitman": "nixpkgs-kitman", + "nixpkgs-unstable": "nixpkgs-unstable_2" + }, + "locked": { + "lastModified": 1699573846, + "narHash": "sha256-4xKNhUE7e3GjjMbNib35B7eJWjuDIbYtwoHBOWYtqFA=", + "owner": "fedimint", + "repo": "fedimint", + "rev": "f58f1913e62b6529a2ff36ec5c89a3852aba7ca7", + "type": "github" + }, + "original": { + "owner": "fedimint", + "repo": "fedimint", + "rev": "f58f1913e62b6529a2ff36ec5c89a3852aba7ca7", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "fedimint", + "flakebox", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1696918968, + "narHash": "sha256-18rAHsM9YsGp7aKKemO4gKIeWfrSyDsdJZ/mk4dQ3JI=", + "owner": "nix-community", + "repo": "fenix", + "rev": "638fc95a2a3d01b372c76f71cbb6d73c63909d6e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1676283394, + "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": [ + "fedimint", + "flakebox", + "systems" + ] + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flakebox": { + "inputs": { + "android-nixpkgs": "android-nixpkgs", + "crane": "crane", + "fenix": "fenix", + "flake-utils": "flake-utils_4", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", + "systems": "systems_4" + }, + "locked": { + "lastModified": 1697820035, + "narHash": "sha256-l+rxi/P5qt+Ud+qQCyOiKB001P/A3J0Hsh7PNg7FyWM=", + "owner": "rustshop", + "repo": "flakebox", + "rev": "0d866b57cd09e30e8385150e846885236ea33bdb", + "type": "github" + }, + "original": { + "owner": "rustshop", + "repo": "flakebox", + "rev": "0d866b57cd09e30e8385150e846885236ea33bdb", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1696697597, + "narHash": "sha256-q26Qv4DQ+h6IeozF2o1secyQG0jt2VUT3V0K58jr3pg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5a237aecb57296f67276ac9ab296a41c23981f56", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-kitman": { + "locked": { + "lastModified": 1677533122, + "narHash": "sha256-nYSQfuPruk5oAF0J7Pp3/Si3tS/H1lg4Rwi7QIbgDJ8=", + "owner": "jkitman", + "repo": "nixpkgs", + "rev": "61ccef8bc0a010a21ccdeb10a92220a47d8149ac", + "type": "github" + }, + "original": { + "owner": "jkitman", + "ref": "add-esplora-pkg", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1697456312, + "narHash": "sha256-roiSnrqb5r+ehnKCauPLugoU8S36KgmWraHgRqVYndo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ca012a02bf8327be9e488546faecae5e05d7d749", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable_2": { + "locked": { + "lastModified": 1697059129, + "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1697226376, + "narHash": "sha256-cumLLb1QOUtWieUnLGqo+ylNt3+fU8Lcv5Zl+tYbRUE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "898cb2064b6e98b8c5499f37e81adbdf2925f7c5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1700097215, + "narHash": "sha256-ODQ3gBTv1iHd7lG21H+ErVISB5wVeOhd/dEogOqHs/I=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9fb122519e9cd465d532f736a98c1e1eb541ef6f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "fedimint": "fedimint", + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_3" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1696840854, + "narHash": "sha256-wphOvjDSDsUN5DMe3MOhdargANIab7YE3hkh3Qv7qso=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "aaa1e8e1b82d742b876d164a30dda02f318ce809", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "fedimint", + "flakebox", + "crane", + "flake-utils" + ], + "nixpkgs": [ + "fedimint", + "flakebox", + "crane", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1695003086, + "narHash": "sha256-d1/ZKuBRpxifmUf7FaedCqhy0lyVbqj44Oc2s+P5bdA=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "b87a14abea512d956f0b89d0d8a1e9b41f3e20ff", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "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 00000000..b9a59cd0 --- /dev/null +++ b/flake.nix @@ -0,0 +1,19 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = { self, nixpkgs, flake-utils, fedimint }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = import nixpkgs { inherit system; }; + in { + devShells = fmLib.devShells // { + default = fmLib.devShells.default.overrideAttrs (prev: { + nativeBuildInputs = [ pkgs.nodejs ] ++ prev.nativeBuildInputs; + shellHook = '' + npm install + ''; + }); + }; + }); +}