diff --git a/default.nix b/default.nix index 37919102..a0a62180 100644 --- a/default.nix +++ b/default.nix @@ -3,9 +3,11 @@ let agnostic = import ./src/args/agnostic.nix { inherit system; }; args = agnostic // { - outputs."/cli/env/runtime" = import ./makes/cli/env/runtime/main.nix args; + outputs."/cli/env/runtime" = + (import ./makes/cli/env/runtime/makes.nix args).jobs."/cli/env/runtime"; outputs."/cli/env/runtime/pypi" = - import ./makes/cli/env/runtime/pypi/main.nix args; + (import ./makes/cli/env/runtime/pypi/makes.nix + args).jobs."/cli/env/runtime/pypi"; projectPath = import ./src/args/project-path args; projectSrc = ./.; }; diff --git a/makes/cli/env/runtime/main.nix b/makes/cli/env/runtime/main.nix deleted file mode 100644 index 3be31666..00000000 --- a/makes/cli/env/runtime/main.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ __nixpkgs__, makeSearchPaths, outputs, ... }: -makeSearchPaths { - bin = [ - __nixpkgs__.cachix - __nixpkgs__.findutils - __nixpkgs__.git - __nixpkgs__.gnutar - __nixpkgs__.gzip - __nixpkgs__.nixVersions.nix_2_15 - __nixpkgs__.openssh - ]; - source = [ outputs."/cli/env/runtime/pypi" ]; -} diff --git a/makes/cli/env/runtime/makes.nix b/makes/cli/env/runtime/makes.nix new file mode 100644 index 00000000..05826635 --- /dev/null +++ b/makes/cli/env/runtime/makes.nix @@ -0,0 +1,14 @@ +{ __nixpkgs__, makeSearchPaths, outputs, ... }: { + jobs."/cli/env/runtime" = makeSearchPaths { + bin = [ + __nixpkgs__.cachix + __nixpkgs__.findutils + __nixpkgs__.git + __nixpkgs__.gnutar + __nixpkgs__.gzip + __nixpkgs__.nixVersions.nix_2_15 + __nixpkgs__.openssh + ]; + source = [ outputs."/cli/env/runtime/pypi" ]; + }; +} diff --git a/makes/cli/env/runtime/pypi/main.nix b/makes/cli/env/runtime/pypi/main.nix deleted file mode 100644 index 035997dc..00000000 --- a/makes/cli/env/runtime/pypi/main.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ makePythonEnvironment, ... }: -makePythonEnvironment { - pythonProjectDir = ./.; - pythonVersion = "3.11"; -} diff --git a/makes/cli/env/runtime/pypi/makes.nix b/makes/cli/env/runtime/pypi/makes.nix new file mode 100644 index 00000000..c62ba588 --- /dev/null +++ b/makes/cli/env/runtime/pypi/makes.nix @@ -0,0 +1,6 @@ +{ makePythonEnvironment, ... }: { + jobs."/cli/env/runtime/pypi" = makePythonEnvironment { + pythonProjectDir = ./.; + pythonVersion = "3.11"; + }; +} diff --git a/makes/cli/env/runtime/pypi/poetry.lock b/makes/cli/env/runtime/pypi/poetry.lock index 7729a284..a6d65a59 100644 --- a/makes/cli/env/runtime/pypi/poetry.lock +++ b/makes/cli/env/runtime/pypi/poetry.lock @@ -16,17 +16,16 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "pygments" -version = "2.17.2" +version = "2.18.0" description = "Pygments is a syntax highlighting package written in Python." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, - {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, + {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, + {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, ] [package.extras] -plugins = ["importlib-metadata"] windows-terminal = ["colorama (>=0.4.6)"] [[package]] diff --git a/makes/cli/env/runtime/pypi/pyproject.toml b/makes/cli/env/runtime/pypi/pyproject.toml index 592d4474..2f03242d 100644 --- a/makes/cli/env/runtime/pypi/pyproject.toml +++ b/makes/cli/env/runtime/pypi/pyproject.toml @@ -10,7 +10,6 @@ python = "^3.11" rich = "12.6.0" textual = "0.1.18" - [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" diff --git a/makes/cli/env/test/main.nix b/makes/cli/env/test/main.nix deleted file mode 100644 index c3d82848..00000000 --- a/makes/cli/env/test/main.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ makePythonEnvironment, ... }: -makePythonEnvironment { - pythonProjectDir = ./.; - pythonVersion = "3.12"; -} diff --git a/makes/cli/env/test/poetry.lock b/makes/cli/env/test/poetry.lock deleted file mode 100644 index 9fca3493..00000000 --- a/makes/cli/env/test/poetry.lock +++ /dev/null @@ -1,156 +0,0 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "coverage" -version = "7.4.0" -description = "Code coverage measurement for Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "coverage-7.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36b0ea8ab20d6a7564e89cb6135920bc9188fb5f1f7152e94e8300b7b189441a"}, - {file = "coverage-7.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0676cd0ba581e514b7f726495ea75aba3eb20899d824636c6f59b0ed2f88c471"}, - {file = "coverage-7.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0ca5c71a5a1765a0f8f88022c52b6b8be740e512980362f7fdbb03725a0d6b9"}, - {file = "coverage-7.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a7c97726520f784239f6c62506bc70e48d01ae71e9da128259d61ca5e9788516"}, - {file = "coverage-7.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:815ac2d0f3398a14286dc2cea223a6f338109f9ecf39a71160cd1628786bc6f5"}, - {file = "coverage-7.4.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:80b5ee39b7f0131ebec7968baa9b2309eddb35b8403d1869e08f024efd883566"}, - {file = "coverage-7.4.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:5b2ccb7548a0b65974860a78c9ffe1173cfb5877460e5a229238d985565574ae"}, - {file = "coverage-7.4.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:995ea5c48c4ebfd898eacb098164b3cc826ba273b3049e4a889658548e321b43"}, - {file = "coverage-7.4.0-cp310-cp310-win32.whl", hash = "sha256:79287fd95585ed36e83182794a57a46aeae0b64ca53929d1176db56aacc83451"}, - {file = "coverage-7.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:5b14b4f8760006bfdb6e08667af7bc2d8d9bfdb648351915315ea17645347137"}, - {file = "coverage-7.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:04387a4a6ecb330c1878907ce0dc04078ea72a869263e53c72a1ba5bbdf380ca"}, - {file = "coverage-7.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ea81d8f9691bb53f4fb4db603203029643caffc82bf998ab5b59ca05560f4c06"}, - {file = "coverage-7.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74775198b702868ec2d058cb92720a3c5a9177296f75bd97317c787daf711505"}, - {file = "coverage-7.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:76f03940f9973bfaee8cfba70ac991825611b9aac047e5c80d499a44079ec0bc"}, - {file = "coverage-7.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:485e9f897cf4856a65a57c7f6ea3dc0d4e6c076c87311d4bc003f82cfe199d25"}, - {file = "coverage-7.4.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6ae8c9d301207e6856865867d762a4b6fd379c714fcc0607a84b92ee63feff70"}, - {file = "coverage-7.4.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:bf477c355274a72435ceb140dc42de0dc1e1e0bf6e97195be30487d8eaaf1a09"}, - {file = "coverage-7.4.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:83c2dda2666fe32332f8e87481eed056c8b4d163fe18ecc690b02802d36a4d26"}, - {file = "coverage-7.4.0-cp311-cp311-win32.whl", hash = "sha256:697d1317e5290a313ef0d369650cfee1a114abb6021fa239ca12b4849ebbd614"}, - {file = "coverage-7.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:26776ff6c711d9d835557ee453082025d871e30b3fd6c27fcef14733f67f0590"}, - {file = "coverage-7.4.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:13eaf476ec3e883fe3e5fe3707caeb88268a06284484a3daf8250259ef1ba143"}, - {file = "coverage-7.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846f52f46e212affb5bcf131c952fb4075b55aae6b61adc9856222df89cbe3e2"}, - {file = "coverage-7.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26f66da8695719ccf90e794ed567a1549bb2644a706b41e9f6eae6816b398c4a"}, - {file = "coverage-7.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:164fdcc3246c69a6526a59b744b62e303039a81e42cfbbdc171c91a8cc2f9446"}, - {file = "coverage-7.4.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:316543f71025a6565677d84bc4df2114e9b6a615aa39fb165d697dba06a54af9"}, - {file = "coverage-7.4.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bb1de682da0b824411e00a0d4da5a784ec6496b6850fdf8c865c1d68c0e318dd"}, - {file = "coverage-7.4.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:0e8d06778e8fbffccfe96331a3946237f87b1e1d359d7fbe8b06b96c95a5407a"}, - {file = "coverage-7.4.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a56de34db7b7ff77056a37aedded01b2b98b508227d2d0979d373a9b5d353daa"}, - {file = "coverage-7.4.0-cp312-cp312-win32.whl", hash = "sha256:51456e6fa099a8d9d91497202d9563a320513fcf59f33991b0661a4a6f2ad450"}, - {file = "coverage-7.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:cd3c1e4cb2ff0083758f09be0f77402e1bdf704adb7f89108007300a6da587d0"}, - {file = "coverage-7.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e9d1bf53c4c8de58d22e0e956a79a5b37f754ed1ffdbf1a260d9dcfa2d8a325e"}, - {file = "coverage-7.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:109f5985182b6b81fe33323ab4707011875198c41964f014579cf82cebf2bb85"}, - {file = "coverage-7.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cc9d4bc55de8003663ec94c2f215d12d42ceea128da8f0f4036235a119c88ac"}, - {file = "coverage-7.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cc6d65b21c219ec2072c1293c505cf36e4e913a3f936d80028993dd73c7906b1"}, - {file = "coverage-7.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5a10a4920def78bbfff4eff8a05c51be03e42f1c3735be42d851f199144897ba"}, - {file = "coverage-7.4.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b8e99f06160602bc64da35158bb76c73522a4010f0649be44a4e167ff8555952"}, - {file = "coverage-7.4.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7d360587e64d006402b7116623cebf9d48893329ef035278969fa3bbf75b697e"}, - {file = "coverage-7.4.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:29f3abe810930311c0b5d1a7140f6395369c3db1be68345638c33eec07535105"}, - {file = "coverage-7.4.0-cp38-cp38-win32.whl", hash = "sha256:5040148f4ec43644702e7b16ca864c5314ccb8ee0751ef617d49aa0e2d6bf4f2"}, - {file = "coverage-7.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:9864463c1c2f9cb3b5db2cf1ff475eed2f0b4285c2aaf4d357b69959941aa555"}, - {file = "coverage-7.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:936d38794044b26c99d3dd004d8af0035ac535b92090f7f2bb5aa9c8e2f5cd42"}, - {file = "coverage-7.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:799c8f873794a08cdf216aa5d0531c6a3747793b70c53f70e98259720a6fe2d7"}, - {file = "coverage-7.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e7defbb9737274023e2d7af02cac77043c86ce88a907c58f42b580a97d5bcca9"}, - {file = "coverage-7.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a1526d265743fb49363974b7aa8d5899ff64ee07df47dd8d3e37dcc0818f09ed"}, - {file = "coverage-7.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf635a52fc1ea401baf88843ae8708591aa4adff875e5c23220de43b1ccf575c"}, - {file = "coverage-7.4.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:756ded44f47f330666843b5781be126ab57bb57c22adbb07d83f6b519783b870"}, - {file = "coverage-7.4.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:0eb3c2f32dabe3a4aaf6441dde94f35687224dfd7eb2a7f47f3fd9428e421058"}, - {file = "coverage-7.4.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bfd5db349d15c08311702611f3dccbef4b4e2ec148fcc636cf8739519b4a5c0f"}, - {file = "coverage-7.4.0-cp39-cp39-win32.whl", hash = "sha256:53d7d9158ee03956e0eadac38dfa1ec8068431ef8058fe6447043db1fb40d932"}, - {file = "coverage-7.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:cfd2a8b6b0d8e66e944d47cdec2f47c48fef2ba2f2dff5a9a75757f64172857e"}, - {file = "coverage-7.4.0-pp38.pp39.pp310-none-any.whl", hash = "sha256:c530833afc4707fe48524a44844493f36d8727f04dcce91fb978c414a8556cc6"}, - {file = "coverage-7.4.0.tar.gz", hash = "sha256:707c0f58cb1712b8809ece32b68996ee1e609f71bd14615bd8f87a1293cb610e"}, -] - -[package.extras] -toml = ["tomli"] - -[[package]] -name = "iniconfig" -version = "2.0.0" -description = "brain-dead simple config-ini parsing" -optional = false -python-versions = ">=3.7" -files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, -] - -[[package]] -name = "packaging" -version = "23.2" -description = "Core utilities for Python packages" -optional = false -python-versions = ">=3.7" -files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, -] - -[[package]] -name = "pluggy" -version = "1.3.0" -description = "plugin and hook calling mechanisms for python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"}, - {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"}, -] - -[package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] - -[[package]] -name = "pytest" -version = "7.4.4" -description = "pytest: simple powerful testing with Python" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" - -[package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] - -[[package]] -name = "pytest-cov" -version = "4.1.0" -description = "Pytest plugin for measuring coverage." -optional = false -python-versions = ">=3.7" -files = [ - {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, - {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, -] - -[package.dependencies] -coverage = {version = ">=5.2.1", extras = ["toml"]} -pytest = ">=4.6" - -[package.extras] -testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] - -[metadata] -lock-version = "2.0" -python-versions = "^3.11" -content-hash = "c5a2e1a58fe2f09b03799d1a82897025c902a73a399c1a4344760fb4d57b0ab8" diff --git a/makes/cli/env/test/pyproject.toml b/makes/cli/env/test/pyproject.toml deleted file mode 100644 index 1c0131c8..00000000 --- a/makes/cli/env/test/pyproject.toml +++ /dev/null @@ -1,16 +0,0 @@ -[tool.poetry] -name = "makes-cli-env-test" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.11" -pytest = "7.4.4" -pytest-cov = "4.1.0" - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/makes/container-image/main.nix b/makes/container-image/main.nix deleted file mode 100644 index 8eece178..00000000 --- a/makes/container-image/main.nix +++ /dev/null @@ -1,148 +0,0 @@ -{ outputs, __nixpkgs__, ... }: -__nixpkgs__.dockerTools.buildImage { - config = { - Env = [ - "HOME=/home/root" - "PATH=/bin:/nix/var/nix/profiles/default/bin" - "USER=root" - - # Certificate authorities - "GIT_SSL_CAINFO=/etc/ssl/certs/ca-bundle.crt" - "NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt" - "SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt" - "SYSTEM_CERTIFICATE_PATH=/etc/ssl/certs/ca-bundle.crt" - - # Support non-nix binaries via nix-ld - "NIX_LD_LIBRARY_PATH=${ - __nixpkgs__.lib.makeLibraryPath [ __nixpkgs__.stdenv.cc ] - }" - "NIX_LD=${ - __nixpkgs__.lib.fileContents - "${__nixpkgs__.stdenv.cc}/nix-support/dynamic-linker" - }" - ]; - User = "root:root"; - WorkingDir = "/working-dir"; - }; - name = "container-image"; - tag = "latest"; - - copyToRoot = __nixpkgs__.buildEnv { - name = "root-file-system"; - ignoreCollisions = false; - paths = [ - # Basic dependencies - __nixpkgs__.bashInteractive - __nixpkgs__.cacert - __nixpkgs__.coreutils - __nixpkgs__.git - __nixpkgs__.gnugrep - __nixpkgs__.gnutar - __nixpkgs__.gzip - __nixpkgs__.nixVersions.nix_2_15 - - # Support non-nix binaries via nix-ld - (__nixpkgs__.runCommand "dynamic-linker" { } '' - mkdir -p $out/lib - mkdir -p $out/lib64 - ln -s ${__nixpkgs__.nix-ld}/libexec/nix-ld $out/lib/$(basename $(< ${__nixpkgs__.stdenv.cc}/nix-support/dynamic-linker)) - ln -s ${__nixpkgs__.nix-ld}/libexec/nix-ld $out/lib64/$(basename $(< ${__nixpkgs__.stdenv.cc}/nix-support/dynamic-linker)) - '') - - # Add /usr/bin/env pointing to /bin/env - (__nixpkgs__.runCommand "user-bin-env" { } '' - mkdir -p $out/usr/bin - ln -s $(command -v env) $out/usr/bin/env - '') - - # Create home directories - (__nixpkgs__.runCommand "home" { } '' - mkdir -p $out/home/makes - mkdir -p $out/home/root - '') - # Create empty temporary directories - (__nixpkgs__.runCommand "tmp" { } '' - mkdir -p $out/tmp - mkdir -p $out/var/tmp - '') - # Create the working directory - (__nixpkgs__.runCommand "working-directory" { } '' - mkdir -p $out/working-dir - '') - - # Configure Nix - (__nixpkgs__.writeTextDir "/home/makes/.config/nix/nix.conf" '' - build-users-group = - '') - (__nixpkgs__.writeTextDir "/home/root/.config/nix/nix.conf" '' - build-users-group = - '') - (__nixpkgs__.writeTextDir "/etc/nix/nix.conf" '' - build-users-group = - '') - - # Configure SSH - (__nixpkgs__.writeTextFile { - name = "home-makes-ssh-config"; - destination = "/home/makes/.ssh/config"; - text = '' - Host * - StrictHostKeyChecking no - ''; - checkPhase = '' - chmod 400 $out/home/makes/.ssh/config - ''; - }) - (__nixpkgs__.writeTextFile { - name = "home-root-ssh-config"; - destination = "/home/root/.ssh/config"; - text = '' - Host * - StrictHostKeyChecking no - ''; - checkPhase = '' - chmod 400 $out/home/root/.ssh/config - ''; - }) - - # Add 3 groups - (__nixpkgs__.writeTextDir "etc/group" '' - root:x:0: - makes:x:48: - nobody:x:65534: - '') - (__nixpkgs__.writeTextDir "etc/gshadow" '' - root:*:: - makes:*:: - nobody:*:: - '') - - # Add 3 users, mapped to groups with their own name - (__nixpkgs__.writeTextDir "etc/passwd" '' - root:x:0:0:root:/home/root:/bin/bash - makes:x:48:48:makes:/home/makes:/bin/bash - nobody:x:65534:65534:nobody:/homeless:/bin/false - '') - (__nixpkgs__.writeTextDir "etc/shadow" '' - root:!x::::::: - makes:!x::::::: - nobody:!x::::::: - '') - - # Miscelaneous configurations - (__nixpkgs__.writeTextDir "etc/login.defs" "") - (__nixpkgs__.writeTextDir "etc/nsswitch.conf" '' - hosts: dns files - '') - (__nixpkgs__.writeTextDir "etc/pam.d/other" '' - account sufficient pam_unix.so - auth sufficient pam_rootok.so - password requisite pam_unix.so nullok sha512 - session required pam_unix.so - '') - - # Add Makes - outputs."/" - ]; - }; -} diff --git a/makes/container-image/makes.nix b/makes/container-image/makes.nix new file mode 100644 index 00000000..13867708 --- /dev/null +++ b/makes/container-image/makes.nix @@ -0,0 +1,149 @@ +{ outputs, __nixpkgs__, ... }: { + jobs."/container-image" = __nixpkgs__.dockerTools.buildImage { + config = { + Env = [ + "HOME=/home/root" + "PATH=/bin:/nix/var/nix/profiles/default/bin" + "USER=root" + + # Certificate authorities + "GIT_SSL_CAINFO=/etc/ssl/certs/ca-bundle.crt" + "NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt" + "SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt" + "SYSTEM_CERTIFICATE_PATH=/etc/ssl/certs/ca-bundle.crt" + + # Support non-nix binaries via nix-ld + "NIX_LD_LIBRARY_PATH=${ + __nixpkgs__.lib.makeLibraryPath [ __nixpkgs__.stdenv.cc ] + }" + "NIX_LD=${ + __nixpkgs__.lib.fileContents + "${__nixpkgs__.stdenv.cc}/nix-support/dynamic-linker" + }" + ]; + User = "root:root"; + WorkingDir = "/working-dir"; + }; + name = "container-image"; + tag = "latest"; + + copyToRoot = __nixpkgs__.buildEnv { + name = "root-file-system"; + ignoreCollisions = false; + paths = [ + # Basic dependencies + __nixpkgs__.bashInteractive + __nixpkgs__.cacert + __nixpkgs__.coreutils + __nixpkgs__.git + __nixpkgs__.gnugrep + __nixpkgs__.gnutar + __nixpkgs__.gzip + __nixpkgs__.nixVersions.nix_2_15 + + # Support non-nix binaries via nix-ld + (__nixpkgs__.runCommand "dynamic-linker" { } '' + mkdir -p $out/lib + mkdir -p $out/lib64 + ln -s ${__nixpkgs__.nix-ld}/libexec/nix-ld $out/lib/$(basename $(< ${__nixpkgs__.stdenv.cc}/nix-support/dynamic-linker)) + ln -s ${__nixpkgs__.nix-ld}/libexec/nix-ld $out/lib64/$(basename $(< ${__nixpkgs__.stdenv.cc}/nix-support/dynamic-linker)) + '') + + # Add /usr/bin/env pointing to /bin/env + (__nixpkgs__.runCommand "user-bin-env" { } '' + mkdir -p $out/usr/bin + ln -s $(command -v env) $out/usr/bin/env + '') + + # Create home directories + (__nixpkgs__.runCommand "home" { } '' + mkdir -p $out/home/makes + mkdir -p $out/home/root + '') + # Create empty temporary directories + (__nixpkgs__.runCommand "tmp" { } '' + mkdir -p $out/tmp + mkdir -p $out/var/tmp + '') + # Create the working directory + (__nixpkgs__.runCommand "working-directory" { } '' + mkdir -p $out/working-dir + '') + + # Configure Nix + (__nixpkgs__.writeTextDir "/home/makes/.config/nix/nix.conf" '' + build-users-group = + '') + (__nixpkgs__.writeTextDir "/home/root/.config/nix/nix.conf" '' + build-users-group = + '') + (__nixpkgs__.writeTextDir "/etc/nix/nix.conf" '' + build-users-group = + '') + + # Configure SSH + (__nixpkgs__.writeTextFile { + name = "home-makes-ssh-config"; + destination = "/home/makes/.ssh/config"; + text = '' + Host * + StrictHostKeyChecking no + ''; + checkPhase = '' + chmod 400 $out/home/makes/.ssh/config + ''; + }) + (__nixpkgs__.writeTextFile { + name = "home-root-ssh-config"; + destination = "/home/root/.ssh/config"; + text = '' + Host * + StrictHostKeyChecking no + ''; + checkPhase = '' + chmod 400 $out/home/root/.ssh/config + ''; + }) + + # Add 3 groups + (__nixpkgs__.writeTextDir "etc/group" '' + root:x:0: + makes:x:48: + nobody:x:65534: + '') + (__nixpkgs__.writeTextDir "etc/gshadow" '' + root:*:: + makes:*:: + nobody:*:: + '') + + # Add 3 users, mapped to groups with their own name + (__nixpkgs__.writeTextDir "etc/passwd" '' + root:x:0:0:root:/home/root:/bin/bash + makes:x:48:48:makes:/home/makes:/bin/bash + nobody:x:65534:65534:nobody:/homeless:/bin/false + '') + (__nixpkgs__.writeTextDir "etc/shadow" '' + root:!x::::::: + makes:!x::::::: + nobody:!x::::::: + '') + + # Miscelaneous configurations + (__nixpkgs__.writeTextDir "etc/login.defs" "") + (__nixpkgs__.writeTextDir "etc/nsswitch.conf" '' + hosts: dns files + '') + (__nixpkgs__.writeTextDir "etc/pam.d/other" '' + account sufficient pam_unix.so + auth sufficient pam_rootok.so + password requisite pam_unix.so nullok sha512 + session required pam_unix.so + '') + + # Add Makes + outputs."/" + ]; + }; + }; +} diff --git a/makes/docs/deploy/main.nix b/makes/docs/deploy/main.nix deleted file mode 100644 index 156299a6..00000000 --- a/makes/docs/deploy/main.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ makeScript, outputs, ... }: -makeScript { - name = "docs-deploy"; - entrypoint = ./entrypoint.sh; - searchPaths.source = [ outputs."/docs/runtime" ]; -} diff --git a/makes/docs/deploy/makes.nix b/makes/docs/deploy/makes.nix new file mode 100644 index 00000000..7d773f2f --- /dev/null +++ b/makes/docs/deploy/makes.nix @@ -0,0 +1,7 @@ +{ makeScript, outputs, ... }: { + jobs."/docs/deploy" = makeScript { + name = "docs-deploy"; + entrypoint = ./entrypoint.sh; + searchPaths.source = [ outputs."/docs/runtime" ]; + }; +} diff --git a/makes/docs/dev/main.nix b/makes/docs/dev/main.nix deleted file mode 100644 index 23888a86..00000000 --- a/makes/docs/dev/main.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ makeScript, outputs, ... }: -makeScript { - name = "docs-dev"; - entrypoint = ./entrypoint.sh; - searchPaths.source = [ outputs."/docs/runtime" ]; -} diff --git a/makes/docs/dev/makes.nix b/makes/docs/dev/makes.nix new file mode 100644 index 00000000..b7f9a2b5 --- /dev/null +++ b/makes/docs/dev/makes.nix @@ -0,0 +1,7 @@ +{ makeScript, outputs, ... }: { + jobs."/docs/dev" = makeScript { + name = "docs-dev"; + entrypoint = ./entrypoint.sh; + searchPaths.source = [ outputs."/docs/runtime" ]; + }; +} diff --git a/makes/docs/runtime/main.nix b/makes/docs/runtime/main.nix deleted file mode 100644 index 269dd3e6..00000000 --- a/makes/docs/runtime/main.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ __nixpkgs__, makePythonEnvironment, makeSearchPaths, outputs, ... }: -makeSearchPaths { - bin = [ __nixpkgs__.git __nixpkgs__.mkdocs ]; - source = [ outputs."/docs/runtime/pypi" ]; -} diff --git a/makes/docs/runtime/makes.nix b/makes/docs/runtime/makes.nix new file mode 100644 index 00000000..1111ebcf --- /dev/null +++ b/makes/docs/runtime/makes.nix @@ -0,0 +1,6 @@ +{ __nixpkgs__, makePythonEnvironment, makeSearchPaths, outputs, ... }: { + jobs."/docs/runtime" = makeSearchPaths { + bin = [ __nixpkgs__.git __nixpkgs__.mkdocs ]; + source = [ outputs."/docs/runtime/pypi" ]; + }; +} diff --git a/makes/docs/runtime/pypi/main.nix b/makes/docs/runtime/pypi/main.nix deleted file mode 100644 index 82202203..00000000 --- a/makes/docs/runtime/pypi/main.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ makePythonEnvironment, ... }: -makePythonEnvironment { - pythonProjectDir = ./.; - pythonVersion = "3.11"; - overrides = self: super: { - mkdocs-material = super.mkdocs-material.overridePythonAttrs - (old: { patchPhase = "echo Skip patchPhase"; }); - }; -} diff --git a/makes/docs/runtime/pypi/makes.nix b/makes/docs/runtime/pypi/makes.nix new file mode 100644 index 00000000..6232b00f --- /dev/null +++ b/makes/docs/runtime/pypi/makes.nix @@ -0,0 +1,10 @@ +{ makePythonEnvironment, ... }: { + jobs."/docs/runtime/pypi" = makePythonEnvironment { + pythonProjectDir = ./.; + pythonVersion = "3.11"; + overrides = self: super: { + mkdocs-material = super.mkdocs-material.overridePythonAttrs + (old: { patchPhase = "echo Skip patchPhase"; }); + }; + }; +} diff --git a/makes/makes.nix b/makes/makes.nix index 6587900c..b3a1b740 100644 --- a/makes/makes.nix +++ b/makes/makes.nix @@ -2,6 +2,13 @@ let makesVersion = "24.12"; in { imports = [ + ./cli/env/runtime/makes.nix + ./cli/env/runtime/pypi/makes.nix + ./container-image/makes.nix + ./docs/deploy/makes.nix + ./docs/dev/makes.nix + ./docs/runtime/makes.nix + ./docs/runtime/pypi/makes.nix ./tests/commitlint/makes.nix ./tests/computeOnAwsBatch/makes.nix ./tests/makeScript/makes.nix diff --git a/makes/nested/main.nix b/makes/nested/main.nix deleted file mode 100644 index 1bd94e91..00000000 --- a/makes/nested/main.nix +++ /dev/null @@ -1,2 +0,0 @@ -{ makeSearchPaths, __nixpkgs__, ... }: -makeSearchPaths { bin = [ __nixpkgs__.git ]; } diff --git a/makes/nested/nested/main.nix b/makes/nested/nested/main.nix deleted file mode 100644 index d7bf5e70..00000000 --- a/makes/nested/nested/main.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ makeScript, ... }: -makeScript { - entrypoint = "echo Hello from Makes!"; - name = "c"; -}