Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
0bdefdd
nixos: add cygwin system builder
corngood Jan 3, 2026
e99eb79
WIP: module changes for cygwin compatibility
corngood Jan 5, 2026
f7e1862
nixos/modules: move nix options from nix-daemon module to nix
corngood Oct 22, 2025
3251383
libarchive: fix cygwin build
corngood Sep 14, 2025
01aea59
cygwin-dll-link: fix indentation
corngood Oct 23, 2025
7a637ea
tzdata: fix cygwin build
corngood Sep 11, 2025
0703769
meson: use system=cygwin for cygwin cross
corngood Sep 15, 2025
333f6c1
nix: fix cygwin build
corngood Sep 15, 2025
5f8eeab
rsync: fix cygwin build
corngood Sep 21, 2025
bcb8f12
krb5: mark broken on cygwin
corngood Sep 26, 2025
6c73a79
libfido2: fix cygwin build
corngood Sep 29, 2025
40c03b5
openssh: fix cygwin build
corngood Sep 29, 2025
998a838
cmake: fix eval on native stdenv
corngood Sep 21, 2025
1d5849f
cmake: fix feature flags when bintools.bintools is missing
corngood Sep 21, 2025
3d90359
stdenv/native: fix eval
corngood Sep 21, 2025
6165e02
HACK: add cygwin system
corngood Sep 23, 2025
20ba558
cygwin-dll-link: skip when $OBJDUMP isn't set
corngood Sep 29, 2025
3fecfbb
gcc: fix cygwin build
corngood Sep 29, 2025
bb3ef66
nix: fix builder PATH on cygwin
corngood Oct 1, 2025
30bb461
cygwin: add hook to create executable links without .exe extension
corngood Oct 3, 2025
37d3015
Revert "cygwin: add hook to create executable links without .exe exte…
corngood Oct 3, 2025
cbfb0a7
{cc,bintools}-wrapper: use executable extension when set
corngood Oct 3, 2025
8f1ab5f
cpython: fix cygwin build
corngood Oct 3, 2025
3e84233
perl: fix cygwin build
corngood Oct 3, 2025
5ce9b5b
WIP: pcre2: fix cygwin build
corngood Oct 5, 2025
5766af5
cygwin.w32api: remove trailing slashes from {inc,lib}dir
corngood Oct 5, 2025
2ea561f
HACK: libxcrypt: disable tests on cygwin
corngood Oct 6, 2025
e0d4b8e
bison: disable doInstallCheck on cygwin
corngood Oct 7, 2025
693089b
cygwin.newlib-cygwin: add symlink patch
corngood Oct 7, 2025
ec18de1
libidn2: fix no-bootstrap-reference.nix on cygwin
corngood Oct 7, 2025
b60f1f1
ed: disable doCheck on cygwin
corngood Oct 7, 2025
c25e61a
unzip: fix cygwin build
corngood Oct 7, 2025
7f27736
tcl: fix cygwin build
corngood Oct 8, 2025
6c8a73c
gdbm: fix cygwin build
corngood Oct 9, 2025
599cbf0
treewide: undo changes causing rebuilds
corngood Sep 29, 2025
8994cb1
cygwin-dll-link: use link for cygwin1.dll
corngood Oct 10, 2025
423952a
cc-wrapper: fix missing cygstdc++ on cygwin non-cross
corngood Oct 14, 2025
fffbce2
pkg-config-unwrapped: fix cygwin build
corngood Oct 15, 2025
9245d96
treewide: undo changes causing rebuilds
corngood Sep 29, 2025
d272221
help2man: fix cygwin build
corngood Oct 15, 2025
e846b2b
flex: fix cygwin build
corngood Oct 15, 2025
c4e0543
treewide: undo changes causing rebuilds
corngood Sep 29, 2025
dd75a32
cmake: fix cygwin build
corngood Oct 16, 2025
9e8923d
groff: fix cygwin build
corngood Oct 17, 2025
a61e24c
popt: fix cygwin build
corngood Oct 18, 2025
3e0fba4
perlPackages.XMLParser: fix cygwin build
corngood Oct 19, 2025
ef7751d
jq: fix cygwin build
corngood Oct 19, 2025
f5ab04a
treewide: undo changes causing rebuilds
corngood Sep 29, 2025
8ecc146
expect: fix cygwin build
corngood Oct 19, 2025
2b5402e
man-db: fix cygwin build
corngood Oct 20, 2025
fd08fab
w3m: fix cygwin build
corngood Oct 20, 2025
c84e6fd
cygwin-dll-link: fix shellcheck warnings
corngood Oct 21, 2025
6cb4201
cygwin-dll-link: link DLLs in /lib/ by default
corngood Oct 21, 2025
baac2c6
cygwin-dll-link: move DLLs to $lib/bin by default
corngood Oct 21, 2025
ab1e289
cygwin-dll-link: make linkDLLs work on individual dirs/files
corngood Oct 21, 2025
96e83b0
cygwin.newlib-cygwin-nobin: remove
corngood Oct 22, 2025
4da7834
lzip: fix cygwin-build
corngood Oct 23, 2025
e47f06a
cygwin: add tests
corngood Oct 23, 2025
1269b73
cygwin-dll-path: init hook
corngood Oct 23, 2025
932af99
flake-systems: add cygwin
corngood Oct 23, 2025
68f916a
texinfo: fix cygwin build
corngood Oct 23, 2025
59cfee0
fetchurl: disable gssSupport on cygwin
corngood Oct 24, 2025
e6b0fc1
findutils: fix cygwin build
corngood Oct 25, 2025
1a7850d
cygwin: fix bootstrap on non-cross
corngood Oct 25, 2025
fe1739a
icu: fix cygwin build
corngood Oct 26, 2025
29737ea
cpython: add tests
corngood Oct 31, 2025
6a7f4ff
cacert: fix cygwin build
corngood Oct 31, 2025
6e8abb5
perlPackages.NetSMTPSSL: fix cygwin build
corngood Oct 31, 2025
2ebfacb
ninja: fix cygwin build
corngood Nov 2, 2025
6801b76
libxml2: fix cygwin build
corngood Nov 3, 2025
b896ff6
opensp: fix cygwin build
corngood Nov 3, 2025
9cdc109
libgit2: fix cygwin build
corngood Nov 4, 2025
523ea40
WIP: cygwin.rebase: init at 4.6.6
corngood Nov 4, 2025
5ca40ac
meson: fix cygwin build
corngood Nov 6, 2025
2caf125
bmake: fix cygwin build
corngood Nov 6, 2025
189c6f1
HACK: undo changes causing rebuilds
corngood Nov 6, 2025
1060da3
git: fix cygwin build
corngood Nov 7, 2025
d9f6ad8
gcc: enable threads on cygwin
corngood Nov 9, 2025
206fac7
git: disable tests by default on cygwin
corngood Nov 10, 2025
9509da1
ld-wrapper: add hook to check for --high-entropy-va on cygwin
corngood Nov 10, 2025
d8842ba
HACK: nix: disable tests on cygwin
corngood Nov 11, 2025
ca84ceb
cmocka: fix cygwin build
corngood Nov 11, 2025
fb48947
libcbor: fix cygwin build
corngood Nov 11, 2025
65a52c1
cocom-tool-set: fix cygwin build
corngood Nov 11, 2025
5554f41
HACK: undo changes causing rebuilds
corngood Nov 11, 2025
c56e88e
cygwin.newlib-cygwin: fix cygwin build
corngood Nov 11, 2025
c125dfb
HACK: undo changes causing rebuilds
corngood Nov 11, 2025
049e541
HACK: add check-cygwin script
corngood Nov 11, 2025
ac2fdb5
bintools-wrapper: fix unsupported hardening on cygwin
corngood Nov 11, 2025
b50f767
stdenv/cygwin: init cross-based stdenv
corngood Nov 11, 2025
b61f4fa
libev: fix cygwin build
corngood Nov 11, 2025
edac4bc
perlPackages.Test2Harness: disable checks on cygwin
corngood Nov 13, 2025
eb85f9a
doctest: fix cygwin build
corngood Nov 14, 2025
e0700a1
vim: fix cygwin build
corngood Nov 14, 2025
5f9b03e
toml11: fix cygwin build
corngood Nov 14, 2025
fa7eec4
nixVersions.nixComponents_2_31.nix-expr-tests: fix cygwin test
corngood Nov 15, 2025
34a0e5a
WIP: add cygwin workflow
corngood Nov 12, 2025
c6ce3fd
HACK: wip
corngood Nov 28, 2025
2d00164
WIP: add hydra VM
corngood Dec 2, 2025
aa2d320
lowdown: move dlls to bin/
corngood Dec 11, 2025
fee0530
treewide: undo changes causing rebuilds
corngood Dec 11, 2025
23a0c24
newlib-cygwin: add patch to fix POLLHUP
corngood Dec 15, 2025
71c9e2e
cygwin: add bootstrap tools
corngood Dec 22, 2025
cde24bd
HACK: remove cygwin workflow
corngood Dec 22, 2025
c36eb2a
cocom-tool-set: fix cross build
corngood Dec 23, 2025
472efe4
treewide: undo changes causing rebuilds
corngood Dec 23, 2025
7755344
WIP: cygwin bootstrap stdenv
corngood Dec 23, 2025
5005d95
gnupatch: fix cygwin build
corngood Dec 29, 2025
ed482de
cygwin-dll-link: search outputs first
corngood Dec 29, 2025
138a729
cygwin-dll-link: improve link handling
corngood Dec 29, 2025
db641b8
workflows: add cygwin bootstrap release
corngood Jan 1, 2026
e83bb8e
nix-perl-bindings: fix cygwin build
corngood Jan 8, 2026
7565e91
groff: fix cygwin build
corngood Jan 13, 2026
5a9e01b
opensp: fix cygwin build
corngood Jan 13, 2026
4a4224d
treewide: undo changes causing rebuilds
corngood Jan 13, 2026
72f975e
HACK: add test workflow
corngood Jan 24, 2026
741f74e
xz: fix cygwin build
corngood Jan 25, 2026
96f2ed1
zstd: fix cygwin build
corngood Jan 26, 2026
fe35c10
dumpnar: fix cygwin build
corngood Jan 26, 2026
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
31 changes: 31 additions & 0 deletions .github/workflows/cygwin-bootstrap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Cygwin Bootstrap Release
on:
push:
tags: 'bootstrap/*'

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Create Release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
tag="${GITHUB_REF_NAME}"
gh release create --draft "$tag" --title "$tag"
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: DeterminateSystems/nix-installer-action@c5a866b6ab867e88becbed4467b93592bce69f8a
- uses: DeterminateSystems/magic-nix-cache-action@b4ad0b1e587499958543d6e793cd46510a21e7c2
- name: Build
run: nix build -f pkgs/top-level/release-cross.nix bootstrapTools.x86_64-pc-cygwin.unpack -o unpack.nar.xz
- name: Upload
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh release upload "${GITHUB_REF_NAME}" unpack.nar.xz
55 changes: 55 additions & 0 deletions .github/workflows/cygwin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: cygwin

permissions: {}

on:
push:

jobs:
build-tarball:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: DeterminateSystems/nix-installer-action@c5a866b6ab867e88becbed4467b93592bce69f8a
- uses: DeterminateSystems/magic-nix-cache-action@b4ad0b1e587499958543d6e793cd46510a21e7c2
- name: build tarball
run: nix build -f nixos/release.nix cygwinTarball.x86_64-linux
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: tarball
path: result
build-bootstrap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: DeterminateSystems/nix-installer-action@c5a866b6ab867e88becbed4467b93592bce69f8a
- uses: DeterminateSystems/magic-nix-cache-action@b4ad0b1e587499958543d6e793cd46510a21e7c2
- name: build bootstrap
run: nix build -f pkgs/top-level/release-cross.nix bootstrapTools.x86_64-pc-cygwin.unpack -o unpack.nar.xz
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: bootstrap
path: unpack.nar.xz
test:
runs-on: windows-latest
needs: build-tarball
steps:
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: tarball
- name: install
run: tarball/install.ps1 cygwin
- name: get-info
shell: pwsh cygwin/cygwin.ps1 {0}
run: nix-info
# - name: build
# shell: pwsh cygwin/cygwin.ps1 {0}
# run: nix build --no-sandbox nixpkgs#hello
# - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
# with:
# name: tarball
# path: result
1 change: 1 addition & 0 deletions bootstrap.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/nix/store/2m6hgrgdccz1yrpqlda0iz3ysxcipnj2-unpacked
14 changes: 14 additions & 0 deletions check-cygwin
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
set -eo pipefail
echo BAD:
nix derivation show -r .#cygwinSystem.config.system.build.tarball.stdenvDeps \
| jq -r 'map_values(select(.system == "x86_64-cygwin")) | keys_unsorted .[]'

nix derivation show -r -f. --argstr system x86_64-cygwin nix \
| jq -r 'map_values(select(.system == "x86_64-linux")) | keys_unsorted .[]' \
| sort > target
nix derivation show -r .#cygwinSystem.config.system.build.tarball.stdenvDeps \
| jq -r 'map_values(select(.system == "x86_64-linux")) | keys_unsorted .[]' \
| sort > bootstrap
echo MISSING:
comm -13 bootstrap target
20 changes: 20 additions & 0 deletions cygwin-custom.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
lib,
pkgs,
config,
...
}:

{
imports = [
./cygwin-system.nix
];

environment.systemPackages = [ pkgs.rsync ];

nix = {
extraOptions = ''
secret-key-files = /var/store-key
'';
};
}
23 changes: 23 additions & 0 deletions cygwin-system.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
lib,
pkgs,
config,
...
}:

{
imports = [
./nixos/maintainers/scripts/cygwin/system.nix
./nixos/maintainers/scripts/cygwin/tarball.nix
];

nix = {
settings.experimental-features = [
"nix-command"
"flakes"
];
};

nixpkgs.buildPlatform = lib.mkDefault builtins.currentSystem;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-cygwin";
}
25 changes: 25 additions & 0 deletions hydra/flake.lock

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

49 changes: 49 additions & 0 deletions hydra/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
outputs =
{ nixpkgs, ... }:
{
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{
boot.isNspawnContainer = true;

services.hydra = {
enable = true;
hydraURL = "http://localhost:3000";
notificationSender = "hydra@localhost";
useSubstitutes = true;
};

networking.firewall.allowedTCPPorts = [ 3000 ];
networking.useHostResolvConf = nixpkgs.lib.mkForce false;
networking.nameservers = [ "8.8.8.8" ];

programs.ssh.extraConfig = nixpkgs.lib.mkAfter ''
Host cygwin-vm
User Quickemu
HostName 10.233.1.1
Port = 22220
'';

services.openssh = {
knownHosts = {
cygwin-vm = {
hostNames = [ "[10.233.1.1]:22220" ];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHJGc5UkkNeYGjBLpgvdZZ8GeW8QtZsvC9IuTMNzLJ/N";
};
};
};

nix.distributedBuilds = true;
nix.buildMachines = [
{
hostName = "cygwin-vm";
system = "x86_64-cygwin";
}
];
}
];
};
};
}
1 change: 1 addition & 0 deletions lib/systems/flake-systems.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@
"powerpc64le-linux"
"riscv64-linux"
"x86_64-freebsd"
"x86_64-cygwin"
]
2 changes: 2 additions & 0 deletions maintainers/scripts/bootstrap-files/refresh-tarballs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ CROSS_TARGETS=(
s390x-unknown-linux-gnu
x86_64-unknown-freebsd
loongarch64-unknown-linux-gnu
x86_64-pc-cygwin
)

is_cross() {
Expand Down Expand Up @@ -168,6 +169,7 @@ for target in "${targets[@]}"; do
*linux*) nixpkgs_prefix="pkgs/stdenv/linux" ;;
*darwin*) nixpkgs_prefix="pkgs/stdenv/darwin" ;;
*freebsd*) nixpkgs_prefix="pkgs/stdenv/freebsd" ;;
*cygwin*) nixpkgs_prefix="pkgs/stdenv/cygwin" ;;
*) die "don't know where to put '$target'" ;;
esac

Expand Down
94 changes: 94 additions & 0 deletions nixos/maintainers/scripts/cygwin/profile.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
lib,
pkgs,
config,
...
}:

{
imports = [
../../../modules/profiles/minimal.nix
];

config = lib.mkIf pkgs.stdenv.hostPlatform.isCygwin {
boot = {
bcache.enable = false;
initrd = {
supportedFilesystems = [ ];
};
kernel.sysctl = lib.mkForce { };
loader.grub.enable = false;
modprobeConfig.enable = false;
supportedFilesystems = [ ];
};

console.enable = false;

fonts.fontconfig.enable = false;

# the default requires glibcLocales
i18n.supportedLocales = [ ];

networking = {
dhcpcd.enable = false;
firewall.enable = false;
resolvconf.enable = false;
};

programs = {
fuse.enable = false;
less.enable = lib.mkForce false;
nano.enable = false;
ssh.systemd-ssh-proxy.enable = false;
};

security = {
pam.enable = false;
shadow.enable = false;
sudo.enable = false;
};

services = {
lvm.enable = false;
udev.enable = false;
};

system = {
disableInstallerTools = true;
# this is needed because tasks/filesystems.nix unconditionally adds
# dosfstools, and tasks/filesystems/ext adds e2fsprogs
fsPackages = lib.mkForce [ ];
# these match the cygwin defaults when "file" is prepended
nssDatabases = {
passwd = [ "db" ];
group = [ "db" ];
};
};

systemd = {
enable = false;
coredump.enable = false;
};

users = {
users = lib.mkForce { };
groups = lib.mkForce { };
};

environment.corePackages =
with pkgs;
lib.mkForce [
bash
coreutils
openssh
curl
config.nix.package
];
environment.defaultPackages = lib.mkForce [ ];

nix = {
settings.sandbox = false;
package = pkgs.nixVersions.git;
};
};
}
Loading
Loading