Skip to content
Snippets Groups Projects
Commit 1621dc66 authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Jakub Ružička
Browse files

CI: Adapt Nix CI for new build setup

parent bf58556c
No related branches found
No related tags found
1 merge request!142Improve version handing: setuptools, poetry
......@@ -141,8 +141,7 @@ default:
- amd64
image: nixos/nix
variables:
#NIX_PATH: nixpkgs=https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz
NIX_PATH: nixpkgs=https://github.com/vcunat/nixpkgs/archive/p/apkg.tar.gz
NIX_PATH: nixpkgs=https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz
before_script:
# - nix-env -f '<nixpkgs>' -iA gitMinimal
- *setup-git
......@@ -150,6 +149,9 @@ default:
- echo 'ID=nixos' > /etc/os-release
# Some archive scripts need /bin/bash
- nix-build '<nixpkgs>' -QA bash && ln -s "$(realpath ./result/bin/bash)" /bin/bash
# dunamai is needed for apkg's make-archive script, i.e. for `apkg install` here
# and also for tests in nixos-unstable-apkg below.
- nix-env -f '<nixpkgs>' -iQA python3.pkgs.dunamai
# Use bootstrap apkg to install itself from the current commit
- nix-shell '<nixpkgs>' -p apkg --run 'apkg install'
allow_failure: true
......@@ -289,6 +291,7 @@ nixos-unstable-apkg:
<<: *apkg
<<: *nixos
script:
- nix-env -f '<nixpkgs>' -iQA gnused
# This test has issues when some step is cached.
# Therefore we simplify by taking test dependencies just from the bootstrap apkg
# (but use $PATH to force the new apkg binary built above).
......
......@@ -22,7 +22,6 @@ python3Packages.buildPythonApplication rec {
cached-property # for python <= 3.7; but pip complains even with 3.8
click # nice CLI framework
distro # current distro detection
dunamai # version from VCS
jinja2 # templating
packaging # version parsing
requests # HTTP for humans™
......@@ -36,8 +35,8 @@ python3Packages.buildPythonApplication rec {
"--prefix" "PATH" ":" (lib.makeBinPath [ gitMinimal rpm dpkg fakeroot ])
];
checkInputs = with python3Packages; [ pytest ];
checkPhase = "py.test"; # inspiration: .gitlab-ci.yml
nativeCheckInputs = with python3Packages; [ pytest dunamai ];
checkPhase = "py.test"; # inspiration: .gitlab-ci.yml; TODO: do more tests, probably
meta = with lib; {
description = "Upstream packaging automation tool";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment