From 2e0f83d0543f7f5dc8cbbdd9bc8ea0546a01974d Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 12 Jul 2024 11:40:36 +0200 Subject: [PATCH 1/7] Add missing module root for publish-to-bcr --- .bcr/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.bcr/config.yml b/.bcr/config.yml index 538fd4d8a..0d70a633a 100644 --- a/.bcr/config.yml +++ b/.bcr/config.yml @@ -1,2 +1,3 @@ moduleRoots: - "core" + - "nodejs" From f5d799e92bb2d1d32791358e92aa0073a1f76c22 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 12 Jul 2024 11:40:51 +0200 Subject: [PATCH 2/7] Add title to draft pull request --- .github/workflows/release.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 12e984832..fd69fa61a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -41,4 +41,9 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh release create --draft --notes-file release_notes.txt v${{ inputs.version }} rules_nixpkgs-${{ inputs.version }}.tar.gz + gh release create \ + --draft \ + --notes-file release_notes.txt \ + --title v${{ inputs.version }} \ + v${{ inputs.version }} \ + rules_nixpkgs-${{ inputs.version }}.tar.gz From 9f4f0d0a59ecbdc4c37e4f3d88bf40eb81b9ddaf Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 12 Jul 2024 11:41:13 +0200 Subject: [PATCH 3/7] Fix reference to awk variable --- .github/workflows/release_prep.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index 8ff0cc03b..2975874ce 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh @@ -6,7 +6,7 @@ TAG=$1 PREFIX="rules_nixpkgs-${TAG:1}" ARCHIVE="rules_nixpkgs-${TAG:1}.tar.gz" git archive --format=tar.gz --prefix="${PREFIX}/" -o $ARCHIVE HEAD -SHA=$(shasum -a 256 "$ARCHIVE" | awk '{print $TAG}') +SHA=$(shasum -a 256 "$ARCHIVE" | awk '{print $1}') cat << EOF ## Using Bzlmod with Bazel 6 From 8c8bc551da0d0cf981b6666ab5992e1d69827d1f Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 12 Jul 2024 13:38:31 +0200 Subject: [PATCH 4/7] Add back bug report and feature request issue templates Before, these were provided by the organization template at https://github.com/tweag/.github --- .github/ISSUE_TEMPLATE/bug_report.md | 22 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..33020c74e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,22 @@ +--- +name: Bug report +about: Create a bug report to help us fix it. +labels: 'type: bug' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Environment** + - OS name + version: + - Version of the code: + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..c160d84c2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature request +about: Suggest an idea for this project. +labels: 'type: feature request' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 4c271bf232f062bd201b74b1fa06e844ddce7325 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 12 Jul 2024 13:48:25 +0200 Subject: [PATCH 5/7] Adapt release body to mention core and nodejs modules --- .github/workflows/release_prep.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index 2975874ce..dc3c101f5 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh @@ -9,15 +9,23 @@ git archive --format=tar.gz --prefix="${PREFIX}/" -o $ARCHIVE HEAD SHA=$(shasum -a 256 "$ARCHIVE" | awk '{print $1}') cat << EOF -## Using Bzlmod with Bazel 6 +## Using Bzlmod with Bazel 6+ 1. Enable with \`common --enable_bzlmod\` in \`.bazelrc\`. 2. Add to your \`MODULE.bazel\` file: +### For the core module + \`\`\`starlark bazel_dep(name = "rules_nixpkgs_core", version = "${TAG:1}") \`\`\` +### For the nodejs module + +\`\`\`starlark +bazel_dep(name = "rules_nixpkgs_nodejs", version = "${TAG:1}") +\`\`\` + ## Using WORKSPACE Paste this snippet into your \`WORKSPACE.bazel\` file: From c2affde5a3663e46df400776999cf90a685230ce Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 12 Jul 2024 14:22:42 +0200 Subject: [PATCH 6/7] nodejs: Simply verify some target on BCR for now The testing module for the nodejs toolchain depends on cc and java toolchain modules, which are not yet available. --- .bcr/nodejs/presubmit.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.bcr/nodejs/presubmit.yml b/.bcr/nodejs/presubmit.yml index b0ae6e813..515abca67 100644 --- a/.bcr/nodejs/presubmit.yml +++ b/.bcr/nodejs/presubmit.yml @@ -1,19 +1,19 @@ -bcr_test_module: - module_path: "testing" - matrix: - platform: ["ubuntu2204"] - bazel: - - "6.x" - tasks: - run_tests: - name: "Run test module" - platform: ${{ platform }} - bazel: ${{ bazel }} - environment: - # The Nix installer updates ~/.profile to set PATH. However, the Bazel - # CI setup seems to disregard ~/.profile. So we set PATH manually here. - PATH: /var/lib/buildkite-agent/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - shell_commands: - - curl -L https://nixos.org/nix/install | sh -s -- --no-daemon - test_targets: - - "//..." +matrix: + platform: + - debian10 + - ubuntu2004 + - macos + # XXX not fully supported yet + #- macos_arm64 + bazel: + - 7.x + - 6.x +tasks: + # XXX use testing module once all dependencies are available from the BCR + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - '@rules_nixpkgs_nodejs//:nodejs' + - '@rules_nixpkgs_nodejs//extensions:toolchain' From f7b6b6bef3fbefdba335ba288611a3b36f3377af Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 12 Jul 2024 16:25:20 +0200 Subject: [PATCH 7/7] testing/python: Use default Python from nixpkgs Fixes #567 --- testing/python/vanilla.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/python/vanilla.nix b/testing/python/vanilla.nix index a433f2ce4..7cb995055 100644 --- a/testing/python/vanilla.nix +++ b/testing/python/vanilla.nix @@ -1,7 +1,7 @@ let nixpkgs = import {}; filterFun = ps: [ ps.flask ]; - pythonWithPkgs = nixpkgs.python310.withPackages filterFun; + pythonWithPkgs = nixpkgs.python3.withPackages filterFun; in { python = pythonWithPkgs.python; pkgs = filterFun pythonWithPkgs.pkgs;