diff --git a/flake.lock b/flake.lock index 2674960..11fbc6b 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1649676176, - "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", + "lastModified": 1656065134, + "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", + "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c", "type": "github" }, "original": { @@ -17,17 +17,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1645950271, - "narHash": "sha256-kR2Rd2Q+7+bkhmmuFKGS3wvkMRTT50UKtu5LhSn9TKs=", - "owner": "nixos", + "lastModified": 1655819575, + "narHash": "sha256-st4XTpKu1/C9pBZk3rShhpQYhqVaYwtsth+6rRXj794=", + "owner": "dguibert", "repo": "nixpkgs", - "rev": "1316edc465ed7b2d650ba8be6a1a0b129926bd81", + "rev": "6a09a0d4aa384060f05d7953c2ad6793891449f2", "type": "github" }, "original": { - "owner": "nixos", + "owner": "dguibert", + "ref": "dg/fix-replacestdenv-coreutils", "repo": "nixpkgs", - "rev": "1316edc465ed7b2d650ba8be6a1a0b129926bd81", "type": "github" } }, @@ -48,17 +48,16 @@ ] }, "locked": { - "lastModified": 1649385338, - "narHash": "sha256-N6CgWq5bXN49OM6A4GmbjwsISxeYLIS3W89XJiqYyik=", + "lastModified": 1656730247, + "narHash": "sha256-UTQm1xRDBxbwIJ5bKIj+PNHsi0YPplvWjJLG5KPt0KU=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "f7d4a3aabee883bfa4d8987a19446ca8f25df81f", + "rev": "be0b8a7cbf95d43f23ef0bfa781d644a43c75396", "type": "github" }, "original": { "owner": "oxalica", "repo": "rust-overlay", - "rev": "f7d4a3aabee883bfa4d8987a19446ca8f25df81f", "type": "github" } } diff --git a/flake.nix b/flake.nix index d6b11ef..a1aa29a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,10 @@ { description = "VIVE Pro 2 support for linux"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/1316edc465ed7b2d650ba8be6a1a0b129926bd81"; + nixpkgs.url = "github:dguibert/nixpkgs/dg/fix-replacestdenv-coreutils"; flake-utils.url = "github:numtide/flake-utils"; rust-overlay = { - url = "github:oxalica/rust-overlay/f7d4a3aabee883bfa4d8987a19446ca8f25df81f"; + url = "github:oxalica/rust-overlay"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; @@ -23,7 +23,8 @@ pkgs = import nixpkgs { inherit system; overlays = [ - rust-overlay.overlay + rust-overlay.overlays.default + (import ./nix/oldGlibc.nix) (final: prev: let rust = (final.buildPackages.rustChannelOf { @@ -46,8 +47,9 @@ }; pkgs-mingw = import nixpkgs { inherit system; + config.replaceStdenv = import ./nix/oldGlibcStdenv.nix; overlays = [ - rust-overlay.overlay + rust-overlay.overlays.default (final: prev: { # inherit rustPlatform; # https://github.com/NixOS/nixpkgs/issues/149593 diff --git a/nix/oldGlibc.nix b/nix/oldGlibc.nix new file mode 100644 index 0000000..b0b99aa --- /dev/null +++ b/nix/oldGlibc.nix @@ -0,0 +1,21 @@ +let nixpkgs-old = builtins.fetchTarball { + name = "release-18.09"; + url = "https://github.com/nixos/nixpkgs/archive/925ff360bc33876fdb6ff967470e34ff375ce65e.tar.gz"; + sha256 = "1qbmp6x01ika4kdc7bhqawasnpmhyl857ldz25nmq9fsmqm1vl2s"; +}; +in +self: super: +let + oldPkgs = import nixpkgs-old { system = super.system; }; +in +rec { + glibc = oldPkgs.glibc // { pname = "glibc"; }; + glibcLocales = oldPkgs.glibcLocales; + glibcIconv = oldPkgs.glibcIconv; + stdenv = super.stdenv // { + overrides = self2: super2: super.stdenv.overrides self2 super2 // { + glibc = glibc; + linuxHeaders = glibc.linuxHeaders; + }; + }; +}