diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml index 0bb27b7..90b3828 100644 --- a/.github/workflows/nix.yaml +++ b/.github/workflows/nix.yaml @@ -31,13 +31,13 @@ jobs: nix build \ -L \ -o ./imgGensqlQuery \ - '.#ociImgGensqlQuery' + './envs-flake#ociImgGensqlQuery' - name: build Loom image run: | nix build \ -L \ -o ./imgLoom \ - '.#ociImgLoom' + './envs-flake#ociImgLoom' - name: Login to Docker Hub # only run this when running on main, because @@ -57,4 +57,4 @@ jobs: if: github.ref == 'refs/heads/main' run: | docker load -i ./imgLoom - docker push --all-tags probcomp/inferenceql.loom + docker push --all-tags probcomp/gensql.loom diff --git a/README.md b/README.md index 026884f..3160098 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,15 @@ This repo holds Nix flake, modules, packages, and reusable utility Nix language Currently, you can build a package directly like so: ```bash -nix build github.com:OpenGen/nix#ociImgBase +nix build github.com:OpenGen/nix#sppl +``` + +### Build an OCI image with an environment + +OCI images consume these libraries and ones from other OpenGen repos, and are specified in another flake (excepting the `base` oci image): + +```bash +nix build github.com:OpenGen/nix#ociImgLoom ``` ### Import utility code @@ -20,13 +28,45 @@ To access the `lib` code exported by this flake, declare this repo as a flake in { inputs = { nixpkgs.url = ... - gensqlnix.url = "github:OpenGen/nix"; + opengen.url = "github:OpenGen/nix"; }; - outputs = inputs@{ nixpkgs, gensqlnix, ... }: let + outputs = inputs@{ nixpkgs, opengen, ... }: let # call some function - toolbox = gensqlnix.lib.basicTools "aarch64-darwin"; + toolbox = opengen.lib.basicTools "aarch64-darwin"; in { ... }; }; ``` + +## Packages + +### `.#sppl` + +Python [library by ProbSys](https://github.com/probsys/sppl) packaged for python3.9 . + +### `.#loom` + +Implementation of [CrossCat in Python](https://github.com/posterior/loom). NOTE: this ONLY builds for `x86_64` architectures and only runs on linux, because it depends on +platform-dependent `distributions`. + +Your options are: + +```bash +nix build '.#packages.x86_64-linux.loom' # same as `.#loom` if that is your OS/arch +nix build './envs-flake#packages.x86_64-darwin.ociImgLoom' +``` + +If you are running on Mac silicon (`aarch64-darwin`), that OCI image will run but behavior is not defined or supported. + +#### `.#loom.morePackages.distributions` + +Native library for probability distributions in python used by Loom. NOTE: this ONLY builds for `x86_64` architectures and only runs on linux. + +#### `.#loom.morePackages.parsable` +#### `.#loom.morePackages.pymetis` +#### `.#loom.morePackages.goftests` +#### `.#loom.morePackages.tcmalloc` + +Other upstream python packages required by Distributions and/or Loom. + diff --git a/envs-flake/flake.lock b/envs-flake/flake.lock new file mode 100644 index 0000000..195aba8 --- /dev/null +++ b/envs-flake/flake.lock @@ -0,0 +1,365 @@ +{ + "nodes": { + "clj-nix": { + "inputs": { + "devshell": "devshell", + "nix-fetcher-data": "nix-fetcher-data", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1713172900, + "narHash": "sha256-1HPffCAfi8PWbf8zcxmMR+Zfp5mqz4LtBYLOr8pL/2o=", + "owner": "jlesquembre", + "repo": "clj-nix", + "rev": "2223155bdea15736ee1be7a9cc3dc33fd8ef1e44", + "type": "github" + }, + "original": { + "owner": "jlesquembre", + "repo": "clj-nix", + "type": "github" + } + }, + "devshell": { + "inputs": { + "nixpkgs": [ + "gensqlquery", + "clj-nix", + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1700815693, + "narHash": "sha256-JtKZEQUzosrCwDsLgm+g6aqbP1aseUl1334OShEAS3s=", + "owner": "numtide", + "repo": "devshell", + "rev": "7ad1c417c87e98e56dcef7ecd0e0a2f2e5669d51", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-part": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1685546676, + "narHash": "sha256-XDbjJyAg6odX5Vj0Q22iI/gQuFvEkv9kamsSbQ+npaI=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "6ef2707776c6379bc727faf3f83c0dd60b06e0c6", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1714641030, + "narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, + "locked": { + "lastModified": 1685546676, + "narHash": "sha256-XDbjJyAg6odX5Vj0Q22iI/gQuFvEkv9kamsSbQ+npaI=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "6ef2707776c6379bc727faf3f83c0dd60b06e0c6", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_4" + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_5" + }, + "locked": { + "lastModified": 1714641030, + "narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "gensqlquery": { + "inputs": { + "clj-nix": "clj-nix", + "flake-parts": "flake-parts_3", + "nixpkgs": "nixpkgs_2", + "systems": "systems_2" + }, + "locked": { + "lastModified": 1714492402, + "narHash": "sha256-y/Hi90+fr0RXrnIA1+flhE7qhRT2124BGWQLTKsB/Z0=", + "owner": "OpenGen", + "repo": "GenSQL.query", + "rev": "32adb67ff07c1bba67255384adbe30d80d4e0f9f", + "type": "github" + }, + "original": { + "owner": "OpenGen", + "repo": "GenSQL.query", + "type": "github" + } + }, + "nix-fetcher-data": { + "inputs": { + "flake-part": "flake-part", + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "gensqlquery", + "clj-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1685572850, + "narHash": "sha256-lYKEqFG9F84xu51H1rM1u+Ip88cINL0+W26sT+vFEZc=", + "owner": "jlesquembre", + "repo": "nix-fetcher-data", + "rev": "f14967db6c92c79b77419f52c22a698518c91120", + "type": "github" + }, + "original": { + "owner": "jlesquembre", + "repo": "nix-fetcher-data", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1714640452, + "narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" + } + }, + "nixpkgs-lib_2": { + "locked": { + "dir": "lib", + "lastModified": 1682879489, + "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_3": { + "locked": { + "dir": "lib", + "lastModified": 1682879489, + "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_4": { + "locked": { + "dir": "lib", + "lastModified": 1711703276, + "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_5": { + "locked": { + "lastModified": 1714640452, + "narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1713725259, + "narHash": "sha256-9ZR/Rbx5/Z/JZf5ehVNMoz/s5xjpP0a22tL6qNvLt5E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a5e4bbcb4780c63c79c87d29ea409abf097de3f7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "opengen": { + "inputs": { + "flake-parts": "flake-parts_4", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 0, + "narHash": "sha256-JkiJfITfqF/j9v19GZmKsSyHNg6QHcZm1zREtk9zyEE=", + "path": "/nix/store/g1pirymr2kh1fbp02pz12k5hzzx46r88-source", + "type": "path" + }, + "original": { + "path": "/nix/store/g1pirymr2kh1fbp02pz12k5hzzx46r88-source", + "type": "path" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "gensqlquery": "gensqlquery", + "nixpkgs": "nixpkgs_3", + "opengen": "opengen" + } + }, + "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" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/envs-flake/flake.nix b/envs-flake/flake.nix new file mode 100644 index 0000000..d2e4e10 --- /dev/null +++ b/envs-flake/flake.nix @@ -0,0 +1,75 @@ +{ + description = "Nix builds of environments and OCI images containing OpenGen tools"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + opengen = { + url = "./.."; + inputs.nixpkgs.follows = "nixpkgs"; + }; + gensqlquery.url = "github:OpenGen/GenSQL.query"; + }; + + outputs = inputs@{ self, nixpkgs, flake-parts, opengen, gensqlquery, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ + # To import a flake module + # 1. Add foo to inputs + # 2. Add foo as a parameter to the outputs function + # 3. Add here: foo.flakeModule + inputs.flake-parts.flakeModules.easyOverlay + ]; + systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; + + + # NOTE: This property is consumed by flake-parts.mkFlake to specify outputs of + # the flake that are replicated for each supported system. Typically packages, + # apps, and devshells are per system. + perSystem = { config, self', inputs', pkgs, system, ... }: + let + toolkit = opengen.lib.basicTools pkgs; + sppl = opengen.packages.${system}.sppl; + + ociImgGensqlQuery = pkgs.callPackage ./images/gensql.query { + inherit nixpkgs opengen gensqlquery; + }; + + ociImgLoom = pkgs.callPackage ./images/gensql.loom { + inherit nixpkgs opengen; + }; + + packages = { + inherit + ociImgGensqlQuery + ociImgLoom + ; + }; + in { + devShells.default = pkgs.mkShell { + packages = [] ++ toolkit; + }; + + devShells.sppl = pkgs.mkShell { + packages + = [sppl] + ++ sppl.checkInputs + ++ toolkit + ; + }; + + inherit packages; + }; + + # NOTE: this property is consumed by flake-parts.mkFlake to define fields + # of the flake that are NOT per system, such as generic `lib` code or other + # universal exports. Note that in our case, the lib is equivalently declared + # by modules that are imported (see ./lib/devtools/default.nix) + flake = { + # The usual flake attributes can be defined here, including system- + # agnostic ones like nixosModule and system-enumerating ones, although + # those are more easily expressed in perSystem. + + }; + }; +} diff --git a/pkgs/oci/gensql.loom/default.nix b/envs-flake/images/gensql.loom/default.nix similarity index 78% rename from pkgs/oci/gensql.loom/default.nix rename to envs-flake/images/gensql.loom/default.nix index b4d3b8c..5e61c02 100644 --- a/pkgs/oci/gensql.loom/default.nix +++ b/envs-flake/images/gensql.loom/default.nix @@ -1,20 +1,20 @@ { pkgs, nixpkgs, + opengen, system, - ociImgBase, }: let # in OCI context, whatever our host platform we want to build same arch but linux systemWithLinux = builtins.replaceStrings [ "darwin" ] [ "linux" ] system; crossPkgsLinux = nixpkgs.legacyPackages.${systemWithLinux}; python = crossPkgsLinux.python3; - scopes = (import ./../../../lib/mkScopes) crossPkgsLinux; + base = opengen.packages.${system}.ociImgBase; - loom = scopes.callPy3Package ./../../loom { }; + loom = opengen.packages.${systemWithLinux}.loom; in pkgs.dockerTools.buildLayeredImage { name = "probcomp/gensql.loom"; tag = systemWithLinux; - fromImage = ociImgBase; + fromImage = base; contents = [ loom python ]; config = { Cmd = [ "${python}/bin/python" "-m" "loom.tasks" ]; diff --git a/pkgs/oci/gensql.query/default.nix b/envs-flake/images/gensql.query/default.nix similarity index 86% rename from pkgs/oci/gensql.query/default.nix rename to envs-flake/images/gensql.query/default.nix index cf5b8c4..6b23aba 100644 --- a/pkgs/oci/gensql.query/default.nix +++ b/envs-flake/images/gensql.query/default.nix @@ -1,18 +1,19 @@ { pkgs, nixpkgs, system, + opengen, gensqlquery, - ociImgBase, }: let # in OCI context, whatever our host platform we want to build same arch but linux systemWithLinux = builtins.replaceStrings [ "darwin" ] [ "linux" ] system; crossPkgsLinux = nixpkgs.legacyPackages.${systemWithLinux}; + base = opengen.packages.${system}.ociImgBase; ociBin = gensqlquery.packages.${systemWithLinux}.bin; in pkgs.dockerTools.buildImage { name = "probcomp/gensql.query"; tag = systemWithLinux; - fromImage = ociImgBase; + fromImage = base; copyToRoot = [ ociBin ]; config = { Cmd = [ "${ociBin}/bin/gensql" ]; diff --git a/flake.lock b/flake.lock index 0ca09c8..3f4f54a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,66 +1,5 @@ { "nodes": { - "clj-nix": { - "inputs": { - "devshell": "devshell", - "nix-fetcher-data": "nix-fetcher-data", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1713172900, - "narHash": "sha256-1HPffCAfi8PWbf8zcxmMR+Zfp5mqz4LtBYLOr8pL/2o=", - "owner": "jlesquembre", - "repo": "clj-nix", - "rev": "2223155bdea15736ee1be7a9cc3dc33fd8ef1e44", - "type": "github" - }, - "original": { - "owner": "jlesquembre", - "repo": "clj-nix", - "type": "github" - } - }, - "devshell": { - "inputs": { - "nixpkgs": [ - "gensqlquery", - "clj-nix", - "nixpkgs" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1700815693, - "narHash": "sha256-JtKZEQUzosrCwDsLgm+g6aqbP1aseUl1334OShEAS3s=", - "owner": "numtide", - "repo": "devshell", - "rev": "7ad1c417c87e98e56dcef7ecd0e0a2f2e5669d51", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "flake-part": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" - }, - "locked": { - "lastModified": 1685546676, - "narHash": "sha256-XDbjJyAg6odX5Vj0Q22iI/gQuFvEkv9kamsSbQ+npaI=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "6ef2707776c6379bc727faf3f83c0dd60b06e0c6", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -79,93 +18,13 @@ "type": "github" } }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_3" - }, - "locked": { - "lastModified": 1685546676, - "narHash": "sha256-XDbjJyAg6odX5Vj0Q22iI/gQuFvEkv9kamsSbQ+npaI=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "6ef2707776c6379bc727faf3f83c0dd60b06e0c6", - "type": "github" - }, - "original": { - "id": "flake-parts", - "type": "indirect" - } - }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_4" - }, - "locked": { - "lastModified": 1712014858, - "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "gensqlquery": { - "inputs": { - "clj-nix": "clj-nix", - "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_2", - "systems": "systems_2" - }, - "locked": { - "lastModified": 1714492402, - "narHash": "sha256-y/Hi90+fr0RXrnIA1+flhE7qhRT2124BGWQLTKsB/Z0=", - "owner": "OpenGen", - "repo": "GenSQL.query", - "rev": "32adb67ff07c1bba67255384adbe30d80d4e0f9f", - "type": "github" - }, - "original": { - "owner": "OpenGen", - "repo": "GenSQL.query", - "type": "github" - } - }, - "nix-fetcher-data": { - "inputs": { - "flake-part": "flake-part", - "flake-parts": "flake-parts_2", - "nixpkgs": [ - "gensqlquery", - "clj-nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1685572850, - "narHash": "sha256-lYKEqFG9F84xu51H1rM1u+Ip88cINL0+W26sT+vFEZc=", - "owner": "jlesquembre", - "repo": "nix-fetcher-data", - "rev": "f14967db6c92c79b77419f52c22a698518c91120", - "type": "github" - }, - "original": { - "owner": "jlesquembre", - "repo": "nix-fetcher-data", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1701253981, - "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", "type": "github" }, "original": { @@ -187,127 +46,10 @@ "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" } }, - "nixpkgs-lib_2": { - "locked": { - "dir": "lib", - "lastModified": 1682879489, - "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib_3": { - "locked": { - "dir": "lib", - "lastModified": 1682879489, - "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib_4": { - "locked": { - "dir": "lib", - "lastModified": 1711703276, - "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1713725259, - "narHash": "sha256-9ZR/Rbx5/Z/JZf5ehVNMoz/s5xjpP0a22tL6qNvLt5E=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a5e4bbcb4780c63c79c87d29ea409abf097de3f7", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1714253743, - "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "flake-parts": "flake-parts", - "gensqlquery": "gensqlquery", - "nixpkgs": "nixpkgs_3" - } - }, - "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" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 1804b1c..c8528f6 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,6 @@ inputs = { flake-parts.url = "github:hercules-ci/flake-parts"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - gensqlquery.url = "github:OpenGen/GenSQL.query"; }; outputs = inputs@{ self, nixpkgs, flake-parts, ... }: @@ -27,47 +26,23 @@ let sppl = pkgs.callPackage ./pkgs/sppl {}; - ociImgBase = pkgs.callPackage ./pkgs/oci/base { + ociImgBase = pkgs.callPackage ./pkgs/ociBase { inherit nixpkgs; basicTools = self.lib.basicTools; }; - ociImgGensqlQuery = pkgs.callPackage ./pkgs/oci/gensql.query { - inherit nixpkgs ociImgBase; - gensqlquery = inputs.gensqlquery; - }; - - toolkit = self.lib.basicTools pkgs; scopes = (self.lib.mkScopes pkgs); loom = scopes.callPy3Package ./pkgs/loom { }; - ociImgLoom = pkgs.callPackage ./pkgs/oci/gensql.loom { - inherit nixpkgs ociImgBase; - }; - packages = loom.more_packages // { inherit loom sppl ociImgBase - ociImgGensqlQuery - ociImgLoom ; }; in { - devShells.default = pkgs.mkShell { - packages = [] ++ toolkit; - }; - - devShells.sppl = pkgs.mkShell { - packages - = [sppl] - ++ sppl.checkInputs - ++ toolkit - ; - }; - inherit packages; }; diff --git a/pkgs/oci/base/default.nix b/pkgs/ociBase/default.nix similarity index 100% rename from pkgs/oci/base/default.nix rename to pkgs/ociBase/default.nix