From 976f60fb647085246959993c30102e0c9ce5ad29 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Sat, 16 Nov 2024 17:03:21 +0100 Subject: [PATCH] Build with neoidiosyn flake --- flake.lock | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 58 ++++++++++++++++++---------- 2 files changed, 148 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index 5134ed1..a0919ce 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,99 @@ { "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flakey-profile": { + "locked": { + "lastModified": 1712898590, + "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=", + "owner": "lf-", + "repo": "flakey-profile", + "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d", + "type": "github" + }, + "original": { + "owner": "lf-", + "repo": "flakey-profile", + "type": "github" + } + }, + "lix": { + "flake": false, + "locked": { + "lastModified": 1732112222, + "narHash": "sha256-H7GN4++a4vE49SUNojZx+FSk4mmpb2ifJUtJMJHProI=", + "rev": "66f6dbda32959dd5cf3a9aaba15af72d037ab7ff", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/66f6dbda32959dd5cf3a9aaba15af72d037ab7ff.tar.gz?rev=66f6dbda32959dd5cf3a9aaba15af72d037ab7ff" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz" + } + }, + "lix-module": { + "inputs": { + "flake-utils": "flake-utils", + "flakey-profile": "flakey-profile", + "lix": [ + "neoidiosyn", + "lix" + ], + "nixpkgs": [ + "neoidiosyn", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1731967274, + "narHash": "sha256-n6dPGRlMGdL8X5gviA6ZuRfUdbdD5KiNN/BpABA5YT0=", + "rev": "aa2846680fa9a2032939d720487942567fd9eb63", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/aa2846680fa9a2032939d720487942567fd9eb63.tar.gz?rev=aa2846680fa9a2032939d720487942567fd9eb63" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz" + } + }, + "neoidiosyn": { + "inputs": { + "lix": "lix", + "lix-module": "lix-module", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1732229087, + "narHash": "sha256-4YWml0ADETUqiwOdMlpcz5L/FRpi+YXCsqeP+9Du8MQ=", + "ref": "refs/heads/main", + "rev": "adabfaea4a7917561e4f1043ab8aef9877f6fad6", + "revCount": 1, + "type": "git", + "url": "https://woof.rip/mikael/neoidiosyn.git" + }, + "original": { + "type": "git", + "url": "https://woof.rip/mikael/neoidiosyn.git" + } + }, "nixpkgs": { "locked": { "lastModified": 1731531548, @@ -18,8 +112,24 @@ }, "root": { "inputs": { + "neoidiosyn": "neoidiosyn", "nixpkgs": "nixpkgs" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 7c1d2c1..2920633 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,10 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + neoidiosyn = { + url = "git+https://woof.rip/mikael/neoidiosyn.git"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; nixConfig = { @@ -11,12 +15,10 @@ extra-trusted-public-keys = [ "cache.kyouma.net:Frjwu4q1rnwE/MnSTmX9yx86GNA/z3p/oElGvucLiZg=" ]; }; - outputs = { self, nixpkgs, ... }: let + outputs = { self, nixpkgs, neoidiosyn, ... }: let inherit (nixpkgs) lib; in { - packages = lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: let - pkgs = nixpkgs.legacyPackages.${system}.pkgsMusl; - mimalloc = pkgs.mimalloc.override { secureBuild = true; }; + packages = lib.mapAttrs (system: pkgs: let extraWrapper = prevAttrs: { buildCommand = prevAttrs.buildCommand + '' sed -i \ @@ -26,6 +28,26 @@ "$out/bin/${prevAttrs.meta.mainProgram}" ''; }; + + wrapFirefox = pkgs.wrapFirefox.override { + ffmpeg = pkgs.ffmpeg.override { + ffmpegVariant = "headless"; + + withAlsa = false; + withAom = false; + withCodec2 = true; + withDrm = false; + withGnutls = false; + withSsh = false; + withV4l2 = false; + + withNetwork = false; + withBin = false; + withLib = true; + withDocumentation = false; + withStripping = true; + }; + }; in { default = self.packages.${system}.firefox; firefox = (pkgs.wrapFirefox self.packages.${system}.firefox-unwrapped { @@ -34,20 +56,14 @@ firefox-unwrapped = ((pkgs.buildMozillaMach { pname = "firefox"; - inherit (pkgs.firefox-beta-unwrapped) src version meta tests; - extraConfigureFlags = [ - "--enable-default-toolkit=cairo-gtk3-wayland-only" - ]; - - extraBuildInputs = [ mimalloc ]; - }).overrideAttrs (prevAttrs: { - env = prevAttrs.env or { } // { - LDFLAGS = lib.toList prevAttrs.env.LDFLAGS or [ ] ++ [ "-lmimalloc" ] |> toString; - }; - })).override { + extraConfigureFlags = [ "--enable-default-toolkit=cairo-gtk3-wayland-only" ]; + }).overrideAttrs { + autoVarInit = "zero"; + boundsCheck = true; + }).override { alsaSupport = false; ffmpegSupport = true; gssSupport = false; @@ -67,9 +83,11 @@ thunderbird = (pkgs.wrapThunderbird self.packages.${system}.thunderbird-unwrapped { }).overrideAttrs extraWrapper; thunderbird-unwrapped = (pkgs.thunderbird-latest-unwrapped.overrideAttrs (prevAttrs: { - configureFlags = prevAttrs.configureFlags or [ ] ++ [ - "--enable-default-toolkit=cairo-gtk3-wayland-only" - ]; + autoVarInit = "zero"; + boundsCheck = true; + + configureFlags = prevAttrs.configureFlags or [ ] + ++ [ "--enable-default-toolkit=cairo-gtk3-wayland-only" ]; })).override { alsaSupport = false; ffmpegSupport = false; @@ -86,9 +104,9 @@ privacySupport = true; drmSupport = false; }; - }); + }) neoidiosyn.legacyPackages; hydraJobs = self.packages |> lib.foldlAttrs (jobs: system: packages: lib.recursiveUpdate jobs - (lib.mapAttrs (name: package: { ${system} = package; }) packages)) { }; + (lib.mapAttrs (name: package: { ${system} = lib.hydraJob package; }) packages)) { }; }; }