From 42bc08f8f90dcd7be59e4d4877da70baef777434 Mon Sep 17 00:00:00 2001 From: DavHau Date: Fri, 27 Nov 2020 12:35:33 +0700 Subject: [PATCH] move flake.lock to mach_nix dir and symlink --- .github/workflows/CI_NixPy.yml | 2 +- flake.lock | 61 +--------------------------------- mach_nix/flake.lock | 60 +++++++++++++++++++++++++++++++++ mach_nix/run.py | 2 +- setup.py | 2 +- 5 files changed, 64 insertions(+), 63 deletions(-) mode change 100644 => 120000 flake.lock create mode 100644 mach_nix/flake.lock diff --git a/.github/workflows/CI_NixPy.yml b/.github/workflows/CI_NixPy.yml index 8b5ab3d..a9f9e67 100644 --- a/.github/workflows/CI_NixPy.yml +++ b/.github/workflows/CI_NixPy.yml @@ -29,7 +29,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install/Setup - NIX - uses: cachix/install-nix-action@v11 + uses: cachix/install-nix-action@v12 with: nix_path: nixpkgs=channel:nixos-unstable #install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-3.0pre20201007_5257a25/install diff --git a/flake.lock b/flake.lock deleted file mode 100644 index fece496..0000000 --- a/flake.lock +++ /dev/null @@ -1,60 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "locked": { - "lastModified": 1601282935, - "narHash": "sha256-WQAFV6sGGQxrRs3a+/Yj9xUYvhTpukQJIcMbIi7LCJ4=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "588973065fce51f4763287f0fda87a174d78bf48", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1605988311, - "narHash": "sha256-PA+kgq46NApOAJlmBNJHs5DwsIrY+jodM0e4g7VtXyY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2247d824fe07f16325596acc7faa286502faffd1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "pypi-deps-db": { - "flake": false, - "locked": { - "lastModified": 1606280641, - "narHash": "sha256-sVYIBMtvZgxQQkbxZg/45xw4e7vVh+5SU1kkvUvtnrc=", - "owner": "DavHau", - "repo": "pypi-deps-db", - "rev": "63bb8887c8de8e056f5ed77ac6a35c771c0c5d57", - "type": "github" - }, - "original": { - "owner": "DavHau", - "repo": "pypi-deps-db", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "pypi-deps-db": "pypi-deps-db" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.lock b/flake.lock new file mode 120000 index 0000000..786dbfa --- /dev/null +++ b/flake.lock @@ -0,0 +1 @@ +./mach_nix/flake.lock \ No newline at end of file diff --git a/mach_nix/flake.lock b/mach_nix/flake.lock new file mode 100644 index 0000000..fece496 --- /dev/null +++ b/mach_nix/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1601282935, + "narHash": "sha256-WQAFV6sGGQxrRs3a+/Yj9xUYvhTpukQJIcMbIi7LCJ4=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "588973065fce51f4763287f0fda87a174d78bf48", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1605988311, + "narHash": "sha256-PA+kgq46NApOAJlmBNJHs5DwsIrY+jodM0e4g7VtXyY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2247d824fe07f16325596acc7faa286502faffd1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pypi-deps-db": { + "flake": false, + "locked": { + "lastModified": 1606280641, + "narHash": "sha256-sVYIBMtvZgxQQkbxZg/45xw4e7vVh+5SU1kkvUvtnrc=", + "owner": "DavHau", + "repo": "pypi-deps-db", + "rev": "63bb8887c8de8e056f5ed77ac6a35c771c0c5d57", + "type": "github" + }, + "original": { + "owner": "DavHau", + "repo": "pypi-deps-db", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "pypi-deps-db": "pypi-deps-db" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/mach_nix/run.py b/mach_nix/run.py index f35de8a..423aa3f 100644 --- a/mach_nix/run.py +++ b/mach_nix/run.py @@ -201,7 +201,7 @@ def parse_args(parser: ArgumentParser, nixpkgs_ref): def main(): # read nixpkgs json file for revision ref - flakes_lock = f"""{pwd}/../flake.lock""" + flakes_lock = f"""{pwd}/flake.lock""" with open(flakes_lock, 'r') as f: nixpkgs_ref = json.load(f)['nodes']['nixpkgs']['locked']['rev'] diff --git a/setup.py b/setup.py index 249b161..5d0af15 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( "mach-nix = mach_nix:main" ], }, - package_data={'': ['nix/*', 'VERSION', 'provider_defaults.toml']}, + package_data={'': ['nix/*', 'VERSION', 'provider_defaults.toml', 'flake.lock']}, setup_requires=["wheel"], install_requires=[ 'distlib ~= 0.3.0',