move flake.lock to mach_nix dir and symlink

This commit is contained in:
DavHau 2020-11-27 12:35:33 +07:00
parent 84383f85ae
commit 42bc08f8f9
5 changed files with 64 additions and 63 deletions

View file

@ -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

View file

@ -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
}

1
flake.lock Symbolic link
View file

@ -0,0 +1 @@
./mach_nix/flake.lock

60
mach_nix/flake.lock Normal file
View file

@ -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
}

View file

@ -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']

View file

@ -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',