Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'Update Version'
on:
push:
branches:
- '_update-deps/runtimeverification/rv-nix-tools'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
update-deps:
name: 'Update Dependencies'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.JENKINS_GITHUB_PAT }}
fetch-depth: 0
- name: 'Configure GitHub user'
run: |
git config user.name devops
git config user.email devops@runtimeverification.com
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v9
- name: 'Install Nix'
uses: cachix/install-nix-action@v22
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
extra_nix_config: |
substituters = http://cache.nixos.org https://hydra.iohk.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
- name: 'Update Poetry files'
run: |
poetry update
git add . && git commit -m "Sync Poetry files" || true
- name: 'Update Nix flake inputs'
run: |
RV_NIX_TOOLS_VERSION=$(cat deps/rv-nix-tools)
sed -i 's! rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/[a-z0-9\.]*"! rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/'"${RV_NIX_TOOLS_VERSION}"'"!' flake.nix
nix flake update
git add flake.nix flake.lock && git commit -m 'flake.{nix,lock}: update Nix derivations' || true
- name: 'Push updates'
run: git push
1 change: 1 addition & 0 deletions deps/rv-nix-tools
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
854d4f05ea78547d46e807b414faad64cea10ae4
137 changes: 113 additions & 24 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 24 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
{
description = "kup";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/854d4f05ea78547d46e807b414faad64cea10ae4";
nixpkgs.follows = "rv-nix-tools/nixpkgs";

flake-utils.url = "github:numtide/flake-utils";
poetry2nix.url = "github:nix-community/poetry2nix";
poetry2nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
outputs = { self, nixpkgs, rv-nix-tools, flake-utils, poetry2nix }:
let
allOverlays = [
poetry2nix.overlay
(final: prev: {
kup = prev.poetry2nix.mkPoetryApplication {
poetry2nix.overlays.default
(final: prev:
let
p2n = poetry2nix.lib.mkPoetry2Nix { pkgs = final; };
in {
kup = p2n.mkPoetryApplication {
python = prev.python39;
projectDir = ./.;
groups = [];
# We remove `"dev"` from `checkGroups`, so that poetry2nix does not try to resolve dev dependencies.
checkGroups = [];
overrides = p2n.defaultPoetryOverrides.extend
(self: super: {
tinynetrc = super.tinynetrc.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
}
);
git-url-parse = super.git-url-parse.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
}
);
});
};
})
];
Expand Down
Loading