From ebc385ea618c54e563bbbde915915af1bfb0ec91 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:59:31 +0200 Subject: [PATCH 01/26] epoll-shim: 0.0.20230411 -> 0.0.20240608 --- pkgs/development/libraries/epoll-shim/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/epoll-shim/default.nix b/pkgs/development/libraries/epoll-shim/default.nix index d303f814b271..bbb49c8ec7c0 100644 --- a/pkgs/development/libraries/epoll-shim/default.nix +++ b/pkgs/development/libraries/epoll-shim/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "epoll-shim"; - version = "0.0.20230411"; + version = "0.0.20240608"; src = fetchFromGitHub { owner = "jiixyj"; - repo = finalAttrs.pname; + repo = "epoll-shim"; rev = "v${finalAttrs.version}"; - hash = "sha256-TOfybtUEp+EtY2l/UGwVFIESDe9kELJCZHlcz22Cmi8="; + hash = "sha256-PIVzVjXOECGv41KtAUmGzUiQ+4lVIyzGEOzVQQ1Pc54="; }; nativeBuildInputs = [ From f20872050bee4169b625978ebf649eec7390b1fd Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:00:35 +0200 Subject: [PATCH 02/26] epoll-shim: move to pkgs/by-name --- .../default.nix => by-name/ep/epoll-shim/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{development/libraries/epoll-shim/default.nix => by-name/ep/epoll-shim/package.nix} (100%) diff --git a/pkgs/development/libraries/epoll-shim/default.nix b/pkgs/by-name/ep/epoll-shim/package.nix similarity index 100% rename from pkgs/development/libraries/epoll-shim/default.nix rename to pkgs/by-name/ep/epoll-shim/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 169e0f6bc72c..7ce96a797161 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20595,8 +20595,6 @@ with pkgs; entt = callPackage ../development/libraries/entt { }; - epoll-shim = callPackage ../development/libraries/epoll-shim { }; - libepoxy = callPackage ../development/libraries/libepoxy { inherit (darwin.apple_sdk.frameworks) Carbon OpenGL; }; From d952db86c9f57d50af70e2b15cc9fb2910aedca2 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Thu, 27 Jul 2023 21:13:55 +0200 Subject: [PATCH 03/26] nixos/vaultwarden: add test for backup script, fix flaky sqlite test --- nixos/tests/all-tests.nix | 2 +- nixos/tests/vaultwarden.nix | 255 +++++++++++++++++++----------------- 2 files changed, 134 insertions(+), 123 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index aa7e007e4fdd..f141fd29133b 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1013,7 +1013,7 @@ in { vault-agent = handleTest ./vault-agent.nix {}; vault-dev = handleTest ./vault-dev.nix {}; vault-postgresql = handleTest ./vault-postgresql.nix {}; - vaultwarden = handleTest ./vaultwarden.nix {}; + vaultwarden = discoverTests (import ./vaultwarden.nix); vector = handleTest ./vector {}; vengi-tools = handleTest ./vengi-tools.nix {}; victoriametrics = handleTest ./victoriametrics.nix {}; diff --git a/nixos/tests/vaultwarden.nix b/nixos/tests/vaultwarden.nix index 28ff170e3610..5b1d55f406b5 100644 --- a/nixos/tests/vaultwarden.nix +++ b/nixos/tests/vaultwarden.nix @@ -1,38 +1,94 @@ -{ system ? builtins.currentSystem -, config ? { } -, pkgs ? import ../.. { inherit system config; } -}: - # These tests will: # * Set up a vaultwarden server -# * Have Firefox use the web vault to create an account, log in, and save a password to the valut +# * Have Firefox use the web vault to create an account, log in, and save a password to the vault # * Have the bw cli log in and read that password from the vault # # Note that Firefox must be on the same machine as the server for WebCrypto APIs to be available (or HTTPS must be configured) # # The same tests should work without modification on the official bitwarden server, if we ever package that. -with import ../lib/testing-python.nix { inherit system pkgs; }; -with pkgs.lib; let - backends = [ "sqlite" "mysql" "postgresql" ]; + makeVaultwardenTest = name: { + backend ? name, + withClient ? true, + testScript ? null, + }: import ./make-test-python.nix ({ lib, pkgs, ...}: let + dbPassword = "please_dont_hack"; + userEmail = "meow@example.com"; + userPassword = "also_super_secret_ZJWpBKZi668QGt"; # Must be complex to avoid interstitial warning on the signup page + storedPassword = "seeeecret"; - dbPassword = "please_dont_hack"; + testRunner = pkgs.writers.writePython3Bin "test-runner" { + libraries = [ pkgs.python3Packages.selenium ]; + flakeIgnore = [ "E501" ]; + } '' - userEmail = "meow@example.com"; - userPassword = "also_super_secret_ZJWpBKZi668QGt"; # Must be complex to avoid interstitial warning on the signup page + from selenium.webdriver.common.by import By + from selenium.webdriver import Firefox + from selenium.webdriver.firefox.options import Options + from selenium.webdriver.support.ui import WebDriverWait + from selenium.webdriver.support import expected_conditions as EC - storedPassword = "seeeecret"; + options = Options() + options.add_argument('--headless') + driver = Firefox(options=options) + + driver.implicitly_wait(20) + driver.get('http://localhost/#/register') + + wait = WebDriverWait(driver, 10) + + wait.until(EC.title_contains("Vaultwarden Web")) + + driver.find_element(By.CSS_SELECTOR, 'input#register-form_input_email').send_keys( + '${userEmail}' + ) + driver.find_element(By.CSS_SELECTOR, 'input#register-form_input_name').send_keys( + 'A Cat' + ) + driver.find_element(By.CSS_SELECTOR, 'input#register-form_input_master-password').send_keys( + '${userPassword}' + ) + driver.find_element(By.CSS_SELECTOR, 'input#register-form_input_confirm-master-password').send_keys( + '${userPassword}' + ) + if driver.find_element(By.CSS_SELECTOR, 'input#checkForBreaches').is_selected(): + driver.find_element(By.CSS_SELECTOR, 'input#checkForBreaches').click() + + driver.find_element(By.XPATH, "//button[contains(., 'Create account')]").click() + + wait.until_not(EC.title_contains("Create account")) + + driver.find_element(By.XPATH, "//button[contains(., 'Continue')]").click() + + driver.find_element(By.CSS_SELECTOR, 'input#login_input_master-password').send_keys( + '${userPassword}' + ) + driver.find_element(By.XPATH, "//button[contains(., 'Log in')]").click() + + wait.until(EC.title_contains("Vaults")) + + driver.find_element(By.XPATH, "//button[contains(., 'New item')]").click() + + driver.find_element(By.CSS_SELECTOR, 'input#name').send_keys( + 'secrets' + ) + driver.find_element(By.CSS_SELECTOR, 'input#loginPassword').send_keys( + '${storedPassword}' + ) + + driver.find_element(By.XPATH, "//button[contains(., 'Save')]").click() + ''; + in { + inherit name; - makeVaultwardenTest = backend: makeTest { - name = "vaultwarden-${backend}"; meta = { - maintainers = with pkgs.lib.maintainers; [ jjjollyjim ]; + maintainers = with pkgs.lib.maintainers; [ dotlambda SuperSandro2000 ]; }; nodes = { - server = { pkgs, ... }: - let backendConfig = { + server = { pkgs, ... }: lib.mkMerge [ + { mysql = { services.mysql = { enable = true; @@ -53,113 +109,47 @@ let postgresql = { services.postgresql = { enable = true; - initialScript = pkgs.writeText "postgresql-init.sql" '' - CREATE USER bitwardenuser WITH PASSWORD '${dbPassword}'; - CREATE DATABASE bitwarden WITH OWNER bitwardenuser; - ''; + ensureDatabases = [ "vaultwarden" ]; + ensureUsers = [{ + name = "vaultwarden"; + ensureDBOwnership = true; + }]; }; - services.vaultwarden.config.databaseUrl = "postgresql://bitwardenuser:${dbPassword}@localhost/bitwarden"; + services.vaultwarden.config.databaseUrl = "postgresql:///vaultwarden?host=/run/postgresql"; systemd.services.vaultwarden.after = [ "postgresql.service" ]; }; - sqlite = { }; - }; - in - mkMerge [ - backendConfig.${backend} - { - services.vaultwarden = { - enable = true; - dbBackend = backend; - config = { - rocketAddress = "0.0.0.0"; - rocketPort = 80; - }; - }; + sqlite = { + services.vaultwarden.backupDir = "/var/lib/vaultwarden/backups"; - networking.firewall.allowedTCPPorts = [ 80 ]; + environment.systemPackages = [ pkgs.sqlite ]; + }; + }.${backend} - environment.systemPackages = - let - testRunner = pkgs.writers.writePython3Bin "test-runner" - { - libraries = [ pkgs.python3Packages.selenium ]; - flakeIgnore = [ - "E501" - ]; - } '' - - from selenium.webdriver.common.by import By - from selenium.webdriver import Firefox - from selenium.webdriver.firefox.options import Options - from selenium.webdriver.support.ui import WebDriverWait - from selenium.webdriver.support import expected_conditions as EC - - options = Options() - options.add_argument('--headless') - driver = Firefox(options=options) - - driver.implicitly_wait(20) - driver.get('http://localhost/#/register') - - wait = WebDriverWait(driver, 10) - - wait.until(EC.title_contains("Vaultwarden Web")) - - driver.find_element(By.CSS_SELECTOR, 'input#register-form_input_email').send_keys( - '${userEmail}' - ) - driver.find_element(By.CSS_SELECTOR, 'input#register-form_input_name').send_keys( - 'A Cat' - ) - driver.find_element(By.CSS_SELECTOR, 'input#register-form_input_master-password').send_keys( - '${userPassword}' - ) - driver.find_element(By.CSS_SELECTOR, 'input#register-form_input_confirm-master-password').send_keys( - '${userPassword}' - ) - if driver.find_element(By.CSS_SELECTOR, 'input#checkForBreaches').is_selected(): - driver.find_element(By.CSS_SELECTOR, 'input#checkForBreaches').click() - - driver.find_element(By.XPATH, "//button[contains(., 'Create account')]").click() - - wait.until_not(EC.title_contains("Create account")) - - driver.find_element(By.XPATH, "//button[contains(., 'Continue')]").click() - - driver.find_element(By.CSS_SELECTOR, 'input#login_input_master-password').send_keys( - '${userPassword}' - ) - driver.find_element(By.XPATH, "//button[contains(., 'Log in')]").click() - - wait.until(EC.title_contains("Vaults")) - - driver.find_element(By.XPATH, "//button[contains(., 'New item')]").click() - - driver.find_element(By.CSS_SELECTOR, 'input#name').send_keys( - 'secrets' - ) - driver.find_element(By.CSS_SELECTOR, 'input#loginPassword').send_keys( - '${storedPassword}' - ) - - driver.find_element(By.XPATH, "//button[contains(., 'Save')]").click() - ''; - in - [ pkgs.firefox-unwrapped pkgs.geckodriver testRunner ]; - - } - ]; - - client = { pkgs, ... }: { - environment.systemPackages = [ pkgs.bitwarden-cli ]; - }; + services.vaultwarden = { + enable = true; + dbBackend = backend; + config = { + rocketAddress = "0.0.0.0"; + rocketPort = 80; + }; + }; + + networking.firewall.allowedTCPPorts = [ 80 ]; + + environment.systemPackages = [ pkgs.firefox-unwrapped pkgs.geckodriver testRunner ]; + } + ]; + } // lib.optionalAttrs withClient { + client = { pkgs, ... }: { + environment.systemPackages = [ pkgs.bitwarden-cli ]; + }; }; - testScript = '' + testScript = if testScript != null then testScript else '' start_all() server.wait_for_unit("vaultwarden.service") server.wait_for_open_port(80) @@ -184,15 +174,36 @@ let client.succeed(f"bw --nointeraction --raw --session {key} sync -f") with subtest("get the password with the cli"): - password = client.succeed( - f"bw --nointeraction --raw --session {key} list items | ${pkgs.jq}/bin/jq -r .[].login.password" + password = client.wait_until_succeeds( + f"bw --nointeraction --raw --session {key} list items | ${pkgs.jq}/bin/jq -r .[].login.password", + timeout=60 ) assert password.strip() == "${storedPassword}" ''; - }; + }); in -builtins.listToAttrs ( - map - (backend: { name = backend; value = makeVaultwardenTest backend; }) - backends -) +builtins.mapAttrs (k: v: makeVaultwardenTest k v) { + mysql = {}; + postgresql = {}; + sqlite = {}; + sqlite-backup = { + backend = "sqlite"; + withClient = false; + + testScript = '' + start_all() + server.wait_for_unit("vaultwarden.service") + server.wait_for_open_port(80) + + with subtest("Set up vaultwarden"): + server.succeed("PYTHONUNBUFFERED=1 test-runner | systemd-cat -t test-runner") + + with subtest("Run the backup script"): + server.start_job("backup-vaultwarden.service") + + with subtest("Check that backup exists"): + server.succeed('[ -d "/var/lib/vaultwarden/backups" ]') + server.succeed('[ -f "/var/lib/vaultwarden/backups/db.sqlite3" ]') + ''; + }; +} From b4cb66799aa51addcbf18e1d3bb36fff7844a278 Mon Sep 17 00:00:00 2001 From: Sandro Date: Wed, 12 Jun 2024 10:22:18 +0200 Subject: [PATCH 04/26] nixos/tests/vaultwarden: check for attachments, too --- nixos/tests/vaultwarden.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/tests/vaultwarden.nix b/nixos/tests/vaultwarden.nix index 5b1d55f406b5..3aba3f6845fa 100644 --- a/nixos/tests/vaultwarden.nix +++ b/nixos/tests/vaultwarden.nix @@ -204,6 +204,7 @@ builtins.mapAttrs (k: v: makeVaultwardenTest k v) { with subtest("Check that backup exists"): server.succeed('[ -d "/var/lib/vaultwarden/backups" ]') server.succeed('[ -f "/var/lib/vaultwarden/backups/db.sqlite3" ]') + server.succeed('[ -d "/var/lib/vaultwarden/backups/attachments" ]') ''; }; } From f14e35698fe4b37bfac92fff0082b41a522dfdb8 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 13 Jun 2024 04:44:48 +0000 Subject: [PATCH 05/26] pdpmake: 1.4.2 -> 1.4.3 --- pkgs/by-name/pd/pdpmake/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pd/pdpmake/package.nix b/pkgs/by-name/pd/pdpmake/package.nix index 94b4ba36cde4..af6960be9e68 100644 --- a/pkgs/by-name/pd/pdpmake/package.nix +++ b/pkgs/by-name/pd/pdpmake/package.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { pname = "pdpmake"; - version = "1.4.2"; + version = "1.4.3"; src = fetchFromGitHub { owner = "rmyorston"; repo = "pdpmake"; rev = version; - hash = "sha256-zp2o/wFYvUbCRwxHbggcGMwoCMNEJuwen8HYkn7AEwc="; + hash = "sha256-drHo8IUC3xQ/O6T4xCMQSK9m+O/6hTOJSw0OMl1W9WA="; }; makeFlags = [ "PREFIX=$(out)" ]; From 048001f32311322da793395f2a1f900bee83aa2c Mon Sep 17 00:00:00 2001 From: Michal Atlas Date: Fri, 14 Jun 2024 02:38:45 +0200 Subject: [PATCH 06/26] sbclPackages.misc-extensions: 20150608 -> 4.0.3 --- pkgs/development/lisp-modules/packages.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index 90caed15cb69..307bd90dd72e 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -882,6 +882,17 @@ let meta.mainProgram = "qlot"; }; + misc-extensions = super.misc-extensions.overrideLispAttrs (old: rec { + version = "4.0.3"; + src = pkgs.fetchFromGitLab { + domain = "gitlab.common-lisp.net"; + owner = "misc-extensions"; + repo = "misc-extensions"; + rev = "v${version}"; + hash = "sha256-bDNI4mIaNw/rf7ZwvwolKo6+mUUxsgubGUd/988sHAo="; + }; + }); + }); in packages From 96d481a0656cba9b2a2a8031feec0e073f7e8113 Mon Sep 17 00:00:00 2001 From: Michal Atlas Date: Fri, 14 Jun 2024 02:39:37 +0200 Subject: [PATCH 07/26] sbclPackages.fset: 20200925 -> 1.4.0 --- pkgs/development/lisp-modules/packages.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index 307bd90dd72e..480b304ca221 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -893,6 +893,26 @@ let }; }); + fset = super.fset.overrideLispAttrs (old: rec { + version = "1.4.0"; + src = pkgs.fetchFromGitHub { + owner = "slburson"; + repo = "fset"; + rev = "v${version}"; + hash = "sha256-alO8Ek5Xpyl5N99/LgyIZ50aoRbY7bKh3XBntFV6Q5k="; + }; + lispLibs = with super; [ + self.misc-extensions + mt19937 + named-readtables + ]; + meta = { + description = "functional collections library"; + homepage = "https://gitlab.common-lisp.net/fset/fset/-/wikis/home"; + license = pkgs.lib.licenses.llgpl21; + }; + }); + }); in packages From 00998ce02c5c0a445ff09ac4ca4ede6134cae7f0 Mon Sep 17 00:00:00 2001 From: Michal Atlas Date: Fri, 14 Jun 2024 02:40:10 +0200 Subject: [PATCH 08/26] sbclPackages.coalton: init --- pkgs/development/lisp-modules/packages.nix | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index 480b304ca221..930ee786d7b2 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -913,6 +913,33 @@ let }; }); + coalton = build-asdf-system { + pname = "coalton"; + version = "trunk"; + src = pkgs.fetchFromGitHub { + owner = "coalton-lang"; + repo = "coalton"; + rev = "05111b8a59e3f7346b175ce1ec621bff588e1e1f"; + hash = "sha256-L9o7Y3zDx9qLXGe/70c1LWEKUWsSRgBQru66mIuaCFw="; + }; + lispLibs = with super; [ + alexandria + eclector-concrete-syntax-tree + fiasco + float-features + self.fset + named-readtables + trivial-garbage + ]; + nativeLibs = [ pkgs.mpfr ]; + systems = [ "coalton" "coalton/tests" ]; + meta = { + description = "statically typed functional programming language that supercharges Common Lisp"; + homepage = "https://coalton-lang.github.io"; + license = pkgs.lib.licenses.mit; + }; + }; + }); in packages From 28e2d04cf05a65dc20e1d150d5affd6c97bde60e Mon Sep 17 00:00:00 2001 From: Michal Atlas Date: Fri, 14 Jun 2024 04:34:40 +0200 Subject: [PATCH 09/26] nyxt.cl-gobject-introspection: update to fix Upstream explicitly fixes compatibility with the newest SBCL --- pkgs/development/lisp-modules/packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index 930ee786d7b2..7afc6cb87137 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -419,8 +419,8 @@ let src = pkgs.fetchFromGitHub { owner = "andy128k"; repo = "cl-gobject-introspection"; - rev = "83beec4492948b52aae4d4152200de5d5c7ac3e9"; - sha256 = "sha256-g/FwWE+Rzmzm5Y+irvd1AJodbp6kPHJIFOFDPhaRlXc="; + rev = "4908a84c16349929b309c50409815ff81fb9b3c4"; + sha256 = "sha256-krVU5TQsVAbglxXMq29WJriWBIgQDLy1iCvB5iNziEc="; };})) (cl-webkit2.overrideAttrs (final: prev: { src = pkgs.fetchFromGitHub { From 7de56791f208ebdd6d568be1dd4c345a673a9dac Mon Sep 17 00:00:00 2001 From: linsui Date: Fri, 7 Jun 2024 15:52:41 +0800 Subject: [PATCH 10/26] vimPlugins.lazydev-nvim: init at 2024-06-09 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update pkgs/applications/editors/vim/plugins/generated.nix Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com> --- pkgs/applications/editors/vim/plugins/generated.nix | 12 ++++++++++++ .../editors/vim/plugins/vim-plugin-names | 1 + 2 files changed, 13 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index bdaf63c658d4..c35a968394a5 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -5327,6 +5327,18 @@ final: prev: meta.homepage = "https://github.com/folke/lazy.nvim/"; }; + lazydev-nvim = buildVimPlugin { + pname = "lazydev-nvim"; + version = "2024-06-09"; + src = fetchFromGitHub { + owner = "folke"; + repo = "lazydev.nvim"; + rev = "7cbb524c85f87017df9c1ea2377a1d840ad8ed51"; + sha256 = "034abfj3rskgqqcynw6mz61bhjmq8x8qn6f4lq6wvyhzhkfplaqb"; + }; + meta.homepage = "https://github.com/folke/lazydev.nvim/"; + }; + lazygit-nvim = buildVimPlugin { pname = "lazygit.nvim"; version = "2024-05-13"; diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index c6414161485c..65f9937deec0 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -451,6 +451,7 @@ https://github.com/sk1418/last256/,, https://github.com/latex-box-team/latex-box/,, https://github.com/dundalek/lazy-lsp.nvim/,HEAD, https://github.com/folke/lazy.nvim/,HEAD, +https://github.com/folke/lazydev.nvim/,, https://github.com/kdheepak/lazygit.nvim/,, https://github.com/Julian/lean.nvim/,, https://github.com/leanprover/lean.vim/,, From efff2acc5b10cd97cd616c617487e9652ef19a03 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Thu, 13 Jun 2024 14:11:50 -0400 Subject: [PATCH 11/26] fetchYarnDeps: properly accept src argument --- pkgs/build-support/node/fetch-yarn-deps/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/node/fetch-yarn-deps/default.nix b/pkgs/build-support/node/fetch-yarn-deps/default.nix index 7f0e0692f81f..e2724ab3a98b 100644 --- a/pkgs/build-support/node/fetch-yarn-deps/default.nix +++ b/pkgs/build-support/node/fetch-yarn-deps/default.nix @@ -97,7 +97,7 @@ in { ''; outputHashMode = "recursive"; - } // hash_ // (removeAttrs args ["src" "name" "hash" "sha256"])); + } // hash_ // (removeAttrs args (["name" "hash" "sha256"] ++ (lib.optional (src == null) "src")))); in lib.setFunctionArgs f (lib.functionArgs f) // { inherit tests; From 882cf1800592fa033666c47b5b0ce4a3435b5c64 Mon Sep 17 00:00:00 2001 From: Atemu Date: Fri, 14 Jun 2024 17:34:37 +0200 Subject: [PATCH 12/26] fetch-yarn-deps: reference files to be copied directly This would cause any drv to be rebuilt when any part of the default.nix changes. What we actually care about is the two JS files though, so simply reference them directly. Co-authored-by: Infinidoge --- pkgs/build-support/node/fetch-yarn-deps/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/node/fetch-yarn-deps/default.nix b/pkgs/build-support/node/fetch-yarn-deps/default.nix index e2724ab3a98b..4ef74c0cab88 100644 --- a/pkgs/build-support/node/fetch-yarn-deps/default.nix +++ b/pkgs/build-support/node/fetch-yarn-deps/default.nix @@ -25,7 +25,8 @@ in { tar --strip-components=1 -xf ${yarnpkg-lockfile-tar} package/index.js mv index.js $out/libexec/yarnpkg-lockfile.js - cp ${./.}/common.js ${./.}/index.js $out/libexec/ + cp ${./common.js} $out/libexec/common.js + cp ${./index.js} $out/libexec/index.js patchShebangs $out/libexec makeWrapper $out/libexec/index.js $out/bin/prefetch-yarn-deps \ @@ -53,7 +54,8 @@ in { tar --strip-components=1 -xf ${yarnpkg-lockfile-tar} package/index.js mv index.js $out/libexec/yarnpkg-lockfile.js - cp ${./.}/common.js ${./.}/fixup.js $out/libexec/ + cp ${./common.js} $out/libexec/common.js + cp ${./fixup.js} $out/libexec/fixup.js patchShebangs $out/libexec makeWrapper $out/libexec/fixup.js $out/bin/fixup-yarn-lock From a994247fa3593ee414c105be7dd32eac3fcd90de Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 15 Jun 2024 02:53:24 +0000 Subject: [PATCH 13/26] rclone: 1.66.0 -> 1.67.0 --- pkgs/applications/networking/sync/rclone/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix index 0ffd47435ff2..11e24de45199 100644 --- a/pkgs/applications/networking/sync/rclone/default.nix +++ b/pkgs/applications/networking/sync/rclone/default.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "rclone"; - version = "1.66.0"; + version = "1.67.0"; src = fetchFromGitHub { owner = "rclone"; repo = "rclone"; rev = "v${version}"; - hash = "sha256-75RnAROICtRUDn95gSCNO0F6wes4CkJteNfUN38GQIY="; + hash = "sha256-rTibyh5z89QuPgZMvv3Y6FCugxMIytAg1gdCxE3+QLE="; }; - vendorHash = "sha256-zGBwgIuabLDqWbutvPHDbPRo5Dd9kNfmgToZXy7KVgI="; + vendorHash = "sha256-Sw9zZf0rup+VyncIpJHp9PKUp60lv+TV4wbWtVTTK3w="; subPackages = [ "." ]; From a54e49b3604cc5cc3c2f74345db6d1a8fb4c9256 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Fri, 19 Jan 2024 12:47:11 -0800 Subject: [PATCH 14/26] flutter.engine: init --- .../development/compilers/flutter/default.nix | 9 +- .../compilers/flutter/engine/constants.nix | 41 +++ .../compilers/flutter/engine/default.nix | 74 +++++ .../compilers/flutter/engine/package.nix | 311 ++++++++++++++++++ .../compilers/flutter/engine/pkg-config.py | 247 ++++++++++++++ .../compilers/flutter/engine/source.nix | 78 +++++ .../compilers/flutter/engine/tools.nix | 62 ++++ .../development/compilers/flutter/flutter.nix | 23 +- .../flutter/update/get-engine-hashes.nix.in | 23 ++ .../compilers/flutter/update/update.py | 45 ++- .../compilers/flutter/versions/3_13/data.json | 3 + .../compilers/flutter/versions/3_16/data.json | 3 + .../compilers/flutter/versions/3_19/data.json | 5 + .../3_19/engine/patches/flutter-140969.patch | 41 +++ .../compilers/flutter/versions/3_22/data.json | 4 + .../compilers/flutter/versions/3_23/data.json | 3 + .../development/compilers/flutter/wrapper.nix | 5 +- pkgs/top-level/all-packages.nix | 4 +- 18 files changed, 972 insertions(+), 9 deletions(-) create mode 100644 pkgs/development/compilers/flutter/engine/constants.nix create mode 100644 pkgs/development/compilers/flutter/engine/default.nix create mode 100644 pkgs/development/compilers/flutter/engine/package.nix create mode 100644 pkgs/development/compilers/flutter/engine/pkg-config.py create mode 100644 pkgs/development/compilers/flutter/engine/source.nix create mode 100644 pkgs/development/compilers/flutter/engine/tools.nix create mode 100644 pkgs/development/compilers/flutter/update/get-engine-hashes.nix.in create mode 100644 pkgs/development/compilers/flutter/versions/3_19/engine/patches/flutter-140969.patch diff --git a/pkgs/development/compilers/flutter/default.nix b/pkgs/development/compilers/flutter/default.nix index fd18f9500288..3f2bb2e5cec8 100644 --- a/pkgs/development/compilers/flutter/default.nix +++ b/pkgs/development/compilers/flutter/default.nix @@ -1,4 +1,4 @@ -{ callPackage, fetchzip, fetchFromGitHub, dart, lib, stdenv }: +{ useNixpkgsEngine ? false, callPackage, fetchzip, fetchFromGitHub, dart, lib, stdenv }@args: let mkCustomFlutter = args: callPackage ./flutter.nix args; wrapFlutter = flutter: callPackage ./wrapper.nix { inherit flutter; }; @@ -8,6 +8,8 @@ let mkFlutter = { version , engineVersion + , engineHashes + , enginePatches , dartVersion , flutterHash , dartHash @@ -15,10 +17,10 @@ let , pubspecLock , artifactHashes , channel - }: + }@fargs: let args = { - inherit version engineVersion patches pubspecLock artifactHashes channel; + inherit version engineVersion engineHashes enginePatches patches pubspecLock artifactHashes useNixpkgsEngine channel; dart = dart.override { version = dartVersion; @@ -64,6 +66,7 @@ let in lib.nameValuePair "v${version}" (wrapFlutter (mkFlutter ({ patches = (getPatches ./patches) ++ (getPatches (versionDir + "/patches")); + enginePatches = (getPatches ./engine/patches) ++ (getPatches (versionDir + "/engine/patches")); } // data)))) (builtins.readDir ./versions); diff --git a/pkgs/development/compilers/flutter/engine/constants.nix b/pkgs/development/compilers/flutter/engine/constants.nix new file mode 100644 index 000000000000..9b7907fc337f --- /dev/null +++ b/pkgs/development/compilers/flutter/engine/constants.nix @@ -0,0 +1,41 @@ +{ lib, targetPlatform }: +rec { + os = + if targetPlatform.isLinux then + "linux" + else if targetPlatform.isDarwin then + "macos" + else if targetPlatform.isWindows then + "windows" + else + throw "Unsupported OS \"${targetPlatform.parsed.kernel.name}\""; + + arch = + if targetPlatform.isx86_64 then + "amd64" + else if targetPlatform.isx86 && targetPlatform.is32bit then + "386" + else if targetPlatform.isAarch64 then + "arm64" + else if targetPlatform.isMips && targetPlatform.parsed.cpu.significantByte == "littleEndian" then + "mipsle" + else if targetPlatform.isMips64 then + "mips64${lib.optionalString (targetPlatform.parsed.cpu.significantByte == "littleEndian") "le"}" + else if targetPlatform.isPower64 then + "ppc64${lib.optionalString (targetPlatform.parsed.cpu.significantByte == "littleEndian") "le"}" + else if targetPlatform.isS390x then + "s390x" + else + throw "Unsupported CPU \"${targetPlatform.parsed.cpu.name}\""; + + alt-arch = + if targetPlatform.isx86_64 then + "x64" + else if targetPlatform.isAarch64 then + "arm64" + else + targetPlatform.parsed.cpu.name; + + platform = "${os}-${arch}"; + alt-platform = "${os}-${alt-arch}"; +} diff --git a/pkgs/development/compilers/flutter/engine/default.nix b/pkgs/development/compilers/flutter/engine/default.nix new file mode 100644 index 000000000000..cea41933e434 --- /dev/null +++ b/pkgs/development/compilers/flutter/engine/default.nix @@ -0,0 +1,74 @@ +{ + callPackage, + dartSdkVersion, + flutterVersion, + version, + hashes, + url, + patches, + runtimeModes, + isOptimized ? true, + lib, + stdenv, +}: +let + mainRuntimeMode = builtins.elemAt runtimeModes 0; + altRuntimeMode = builtins.elemAt runtimeModes 1; + + runtimeModesBuilds = lib.genAttrs runtimeModes ( + runtimeMode: + callPackage ./package.nix { + inherit + dartSdkVersion + flutterVersion + version + hashes + url + patches + runtimeMode + isOptimized + ; + } + ); +in +stdenv.mkDerivation ( + { + pname = "flutter-engine"; + inherit url runtimeModes; + inherit (runtimeModesBuilds.${mainRuntimeMode}) + meta + src + version + dartSdkVersion + isOptimized + runtimeMode + ; + inherit altRuntimeMode; + + dontUnpack = true; + dontBuild = true; + + installPhase = + '' + mkdir -p $out/out + + for dir in $(find $src/src -mindepth 1 -maxdepth 1); do + ln -sf $dir $out/$(basename $dir) + done + + '' + + lib.concatMapStrings ( + runtimeMode: + let + runtimeModeBuild = runtimeModesBuilds.${runtimeMode}; + runtimeModeOut = "host_${runtimeMode}${ + lib.optionalString (!runtimeModeBuild.isOptimized) "_unopt" + }"; + in + '' + ln -sf ${runtimeModeBuild}/out/${runtimeModeOut} $out/out/${runtimeModeOut} + '' + ) runtimeModes; + } + // runtimeModesBuilds +) diff --git a/pkgs/development/compilers/flutter/engine/package.nix b/pkgs/development/compilers/flutter/engine/package.nix new file mode 100644 index 000000000000..6f87b28f1909 --- /dev/null +++ b/pkgs/development/compilers/flutter/engine/package.nix @@ -0,0 +1,311 @@ +{ + lib, + callPackage, + writeText, + symlinkJoin, + targetPlatform, + hostPlatform, + darwin, + clang, + llvm, + tools ? callPackage ./tools.nix { inherit hostPlatform; }, + stdenv, + stdenvNoCC, + runCommand, + patchelf, + xorg, + libglvnd, + libepoxy, + wayland, + freetype, + pango, + glib, + harfbuzz, + cairo, + gdk-pixbuf, + at-spi2-atk, + zlib, + gtk3, + pkg-config, + ninja, + python3, + git, + version, + flutterVersion, + dartSdkVersion, + hashes, + patches, + url, + runtimeMode ? "release", + isOptimized ? true, +}: +with lib; +let + expandSingleDep = + dep: lib.optionals (lib.isDerivation dep) ([ dep ] ++ map (output: dep.${output}) dep.outputs); + + expandDeps = deps: flatten (map expandSingleDep deps); + + constants = callPackage ./constants.nix { inherit targetPlatform; }; + + src = callPackage ./source.nix { + inherit + tools + version + hashes + url + ; + }; +in +stdenv.mkDerivation { + pname = "flutter-engine-${runtimeMode}${lib.optionalString (!isOptimized) "-unopt"}"; + inherit + version + runtimeMode + patches + isOptimized + dartSdkVersion + src; + + toolchain = symlinkJoin { + name = "flutter-engine-toolchain-${version}"; + + paths = + expandDeps ( + optionals (stdenv.isLinux) [ + gtk3 + wayland + libepoxy + libglvnd + freetype + at-spi2-atk + glib + gdk-pixbuf + harfbuzz + pango + cairo + xorg.libxcb + xorg.libX11 + xorg.libXcursor + xorg.libXrandr + xorg.libXrender + xorg.libXinerama + xorg.libXi + xorg.libXext + xorg.libXfixes + xorg.libXxf86vm + xorg.xorgproto + zlib + ] + ++ optionals (stdenv.isDarwin) [ + clang + llvm + ] + ) + ++ [ + stdenv.cc.libc_dev + stdenv.cc.libc_lib + ]; + + postBuild = '' + ln -s /nix $out/nix + ''; + }; + + nativeBuildInputs = + [ + python3 + (tools.vpython python3) + git + pkg-config + ninja + ] + ++ lib.optionals (stdenv.isLinux) [ patchelf ] + ++ optionals (stdenv.isDarwin) [ + darwin.system_cmds + darwin.xcode + tools.xcode-select + ] + ++ lib.optionals (stdenv.cc.libc ? bin) [ stdenv.cc.libc.bin ]; + + buildInputs = [ gtk3 ]; + + patchtools = + let + buildtoolsPath = + if lib.versionAtLeast flutterVersion "3.21" then "flutter/buildtools" else "buildtools"; + in + [ + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/clang-apply-replacements" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/clang-doc" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/clang-format" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/clang-include-fixer" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/clang-refactor" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/clang-scan-deps" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/clang-tidy" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/clangd" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/dsymutil" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/find-all-symbols" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/lld" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-ar" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-bolt" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-cov" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-cxxfilt" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-debuginfod-find" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-dwarfdump" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-dwp" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-gsymutil" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-ifs" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-libtool-darwin" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-lipo" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-ml" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-mt" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-nm" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-objcopy" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-objdump" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-pdbutil" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-profdata" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-rc" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-readobj" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-size" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-symbolizer" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-undname" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm-xray" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/llvm" + "${buildtoolsPath}/${constants.alt-platform}/clang/bin/sancov" + "flutter/prebuilts/${constants.alt-platform}/dart-sdk/bin/dartaotruntime" + "flutter/prebuilts/${constants.alt-platform}/dart-sdk/bin/dart" + "flutter/third_party/gn/gn" + "third_party/dart/tools/sdks/dart-sdk/bin/dart" + ]; + + dontPatch = true; + + patchgit = [ + "third_party/dart" + "flutter" + "." + ] ++ lib.optional (lib.versionAtLeast flutterVersion "3.21") "flutter/third_party/skia"; + + postUnpack = '' + pushd ${src.name} + ${lib.optionalString (stdenv.isLinux) '' + for patchtool in ''${patchtools[@]}; do + patchelf src/$patchtool --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) + done + ''} + + for dir in ''${patchgit[@]}; do + pushd src/$dir + rev=$(cat .git/HEAD) + rm -rf .git + git init + git add . + git config user.name "nobody" + git config user.email "nobody@local.host" + git commit -a -m "$rev" + popd + done + + src/flutter/prebuilts/${constants.alt-platform}/dart-sdk/bin/dart src/third_party/dart/tools/generate_package_config.dart + cp ${./pkg-config.py} src/build/config/linux/pkg-config.py + echo "${dartSdkVersion}" >src/third_party/dart/sdk/version + + rm -rf src/third_party/angle/.git + python3 src/flutter/tools/pub_get_offline.py + + pushd src/flutter + + for p in ''${patches[@]}; do + patch -p1 -i $p + done + + popd + popd + ''; + + configureFlags = + [ + "--no-prebuilt-dart-sdk" + "--embedder-for-target" + "--no-goma" + ] + ++ optionals (targetPlatform.isx86_64 == false) [ + "--linux" + "--linux-cpu ${constants.alt-arch}" + ]; + + # NOTE: Once https://github.com/flutter/flutter/issues/127606 is fixed, use "--no-prebuilt-dart-sdk" + configurePhase = + '' + runHook preConfigure + + export PYTHONPATH=$src/src/build + '' + + lib.optionalString stdenv.isDarwin '' + export PATH=${darwin.xcode}/Contents/Developer/usr/bin/:$PATH + '' + + '' + python3 ./src/flutter/tools/gn $configureFlags \ + --runtime-mode $runtimeMode \ + --out-dir $out \ + --target-sysroot $toolchain \ + --target-dir host_$runtimeMode${lib.optionalString (!isOptimized) "_unopt --unoptimized"} \ + --verbose + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + + export TERM=dumb + for tool in flatc scenec gen_snapshot dart impellerc shader_archiver gen_snapshot_product; do + ninja -C $out/out/host_$runtimeMode${ + lib.optionalString (!isOptimized) "_unopt" + } -j$NIX_BUILD_CORES $tool + ${lib.optionalString (stdenv.isLinux) '' + patchelf $out/out/host_$runtimeMode${ + lib.optionalString (!isOptimized) "_unopt" + }/$tool --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) + ''} + done + + ninja -C $out/out/host_$runtimeMode${lib.optionalString (!isOptimized) "_unopt"} -j$NIX_BUILD_CORES + + ${lib.optionalString (stdenv.isLinux) '' + patchelf $out/out/host_$runtimeMode${ + lib.optionalString (!isOptimized) "_unopt" + }/dart-sdk/bin/dartaotruntime \ + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) + ''} + + runHook postBuild + ''; + + # Link sources so we can set $FLUTTER_ENGINE to this derivation + installPhase = '' + runHook preInstall + + for dir in $(find $src/src -mindepth 1 -maxdepth 1); do + ln -sf $dir $out/$(basename $dir) + done + + runHook postInstall + ''; + + meta = { + # Very broken on Darwin + broken = stdenv.isDarwin; + description = "The Flutter engine"; + homepage = "https://flutter.dev"; + maintainers = with maintainers; [ RossComputerGuy ]; + license = licenses.bsd3; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + }; +} diff --git a/pkgs/development/compilers/flutter/engine/pkg-config.py b/pkgs/development/compilers/flutter/engine/pkg-config.py new file mode 100644 index 000000000000..1df08211e570 --- /dev/null +++ b/pkgs/development/compilers/flutter/engine/pkg-config.py @@ -0,0 +1,247 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + + +import json +import os +import subprocess +import sys +import re +from optparse import OptionParser + +# This script runs pkg-config, optionally filtering out some results, and +# returns the result. +# +# The result will be [ , , , , ] +# where each member is itself a list of strings. +# +# You can filter out matches using "-v " where all results from +# pkgconfig matching the given regular expression will be ignored. You can +# specify more than one regular expression my specifying "-v" more than once. +# +# You can specify a sysroot using "-s " where sysroot is the absolute +# system path to the sysroot used for compiling. This script will attempt to +# generate correct paths for the sysroot. +# +# When using a sysroot, you must also specify the architecture via +# "-a " where arch is either "x86" or "x64". +# +# CrOS systemroots place pkgconfig files at /usr/share/pkgconfig +# and one of /usr/lib/pkgconfig or /usr/lib64/pkgconfig +# depending on whether the systemroot is for a 32 or 64 bit architecture. They +# specify the 'lib' or 'lib64' of the pkgconfig path by defining the +# 'system_libdir' variable in the args.gn file. pkg_config.gni communicates this +# variable to this script with the "--system_libdir " flag. If no +# flag is provided, then pkgconfig files are assumed to come from +# /usr/lib/pkgconfig. +# +# Additionally, you can specify the option --atleast-version. This will skip +# the normal outputting of a dictionary and instead print true or false, +# depending on the return value of pkg-config for the given package. + + +def SetConfigPath(options): + """Set the PKG_CONFIG_LIBDIR environment variable. + + This takes into account any sysroot and architecture specification from the + options on the given command line. + """ + + sysroot = options.sysroot + assert sysroot + + # Compute the library path name based on the architecture. + arch = options.arch + if sysroot and not arch: + print("You must specify an architecture via -a if using a sysroot.") + sys.exit(1) + + libdir = sysroot + '/' + options.system_libdir + '/pkgconfig' + libdir += ':' + sysroot + '/share/pkgconfig' + os.environ['PKG_CONFIG_LIBDIR'] = libdir + return libdir + + +def GetPkgConfigPrefixToStrip(options, args): + """Returns the prefix from pkg-config where packages are installed. + + This returned prefix is the one that should be stripped from the beginning of + directory names to take into account sysroots. + """ + # Some sysroots, like the Chromium OS ones, may generate paths that are not + # relative to the sysroot. For example, + # /path/to/chroot/build/x86-generic/usr/lib/pkgconfig/pkg.pc may have all + # paths relative to /path/to/chroot (i.e. prefix=/build/x86-generic/usr) + # instead of relative to /path/to/chroot/build/x86-generic (i.e prefix=/usr). + # To support this correctly, it's necessary to extract the prefix to strip + # from pkg-config's |prefix| variable. + prefix = subprocess.check_output([options.pkg_config, + "--variable=prefix"] + args, env=os.environ).decode('utf-8') + return prefix + + +def MatchesAnyRegexp(flag, list_of_regexps): + """Returns true if the first argument matches any regular expression in the + given list.""" + for regexp in list_of_regexps: + if regexp.search(flag) != None: + return True + return False + + +def RewritePath(path, strip_prefix, sysroot): + """Rewrites a path by stripping the prefix and prepending the sysroot.""" + if os.path.isabs(path) and not path.startswith(sysroot): + if path.startswith(strip_prefix): + path = path[len(strip_prefix):] + path = path.lstrip('/') + return os.path.join(sysroot, path) + else: + return path + + +def main(): + # If this is run on non-Linux platforms, just return nothing and indicate + # success. This allows us to "kind of emulate" a Linux build from other + # platforms. + if "linux" not in sys.platform: + print("[[],[],[],[],[]]") + return 0 + + parser = OptionParser() + parser.add_option('-d', '--debug', action='store_true') + parser.add_option('-p', action='store', dest='pkg_config', type='string', + default='pkg-config') + parser.add_option('-v', action='append', dest='strip_out', type='string') + parser.add_option('-s', action='store', dest='sysroot', type='string') + parser.add_option('-a', action='store', dest='arch', type='string') + parser.add_option('--system_libdir', action='store', dest='system_libdir', + type='string', default='lib') + parser.add_option('--atleast-version', action='store', + dest='atleast_version', type='string') + parser.add_option('--libdir', action='store_true', dest='libdir') + parser.add_option('--dridriverdir', action='store_true', dest='dridriverdir') + parser.add_option('--version-as-components', action='store_true', + dest='version_as_components') + (options, args) = parser.parse_args() + + # Make a list of regular expressions to strip out. + strip_out = [] + if options.strip_out != None: + for regexp in options.strip_out: + strip_out.append(re.compile(regexp)) + + if options.sysroot: + libdir = SetConfigPath(options) + if options.debug: + sys.stderr.write('PKG_CONFIG_LIBDIR=%s\n' % libdir) + prefix = GetPkgConfigPrefixToStrip(options, args) + else: + prefix = '' + + if options.atleast_version: + # When asking for the return value, just run pkg-config and print the return + # value, no need to do other work. + if not subprocess.call([options.pkg_config, + "--atleast-version=" + options.atleast_version] + + args): + print("true") + else: + print("false") + return 0 + + if options.version_as_components: + cmd = [options.pkg_config, "--modversion"] + args + try: + version_string = subprocess.check_output(cmd).decode('utf-8') + except: + sys.stderr.write('Error from pkg-config.\n') + return 1 + print(json.dumps(list(map(int, version_string.strip().split("."))))) + return 0 + + + if options.libdir: + cmd = [options.pkg_config, "--variable=libdir"] + args + if options.debug: + sys.stderr.write('Running: %s\n' % cmd) + try: + libdir = subprocess.check_output(cmd).decode('utf-8') + except: + print("Error from pkg-config.") + return 1 + sys.stdout.write(libdir.strip()) + return 0 + + if options.dridriverdir: + cmd = [options.pkg_config, "--variable=dridriverdir"] + args + if options.debug: + sys.stderr.write('Running: %s\n' % cmd) + try: + dridriverdir = subprocess.check_output(cmd).decode('utf-8') + except: + print("Error from pkg-config.") + return 1 + sys.stdout.write(dridriverdir.strip()) + return + + cmd = [options.pkg_config, "--cflags", "--libs"] + args + if options.debug: + sys.stderr.write('Running: %s\n' % ' '.join(cmd)) + + try: + flag_string = subprocess.check_output(cmd).decode('utf-8') + except: + sys.stderr.write('Could not run pkg-config.\n') + return 1 + + # For now just split on spaces to get the args out. This will break if + # pkgconfig returns quoted things with spaces in them, but that doesn't seem + # to happen in practice. + all_flags = flag_string.strip().split(' ') + + + sysroot = options.sysroot + if not sysroot: + sysroot = '' + + includes = [] + cflags = [] + libs = [] + lib_dirs = [] + + for flag in all_flags[:]: + if len(flag) == 0 or MatchesAnyRegexp(flag, strip_out): + continue; + + if flag[:2] == '-l': + libs.append(RewritePath(flag[2:], prefix, sysroot)) + elif flag[:2] == '-L': + lib_dirs.append(RewritePath(flag[2:], prefix, sysroot)) + elif flag[:2] == '-I': + includes.append(RewritePath(flag[2:], prefix, sysroot)) + elif flag[:3] == '-Wl': + # Don't allow libraries to control ld flags. These should be specified + # only in build files. + pass + elif flag == '-pthread': + # Many libs specify "-pthread" which we don't need since we always include + # this anyway. Removing it here prevents a bunch of duplicate inclusions + # on the command line. + pass + else: + cflags.append(flag) + + # Output a GN array, the first one is the cflags, the second are the libs. The + # JSON formatter prints GN compatible lists when everything is a list of + # strings. + print(json.dumps([includes, cflags, libs, lib_dirs])) + return 0 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/pkgs/development/compilers/flutter/engine/source.nix b/pkgs/development/compilers/flutter/engine/source.nix new file mode 100644 index 000000000000..056cb47b5d5d --- /dev/null +++ b/pkgs/development/compilers/flutter/engine/source.nix @@ -0,0 +1,78 @@ +{ + callPackage, + hostPlatform, + targetPlatform, + tools ? callPackage ./tools.nix { inherit hostPlatform; }, + curl, + pkg-config, + git, + python3, + runCommand, + writeText, + cacert, + version, + hashes, + url, +}: +let + constants = callPackage ./constants.nix { inherit targetPlatform; }; +in +runCommand "flutter-engine-source-${version}-${targetPlatform.system}" + { + pname = "flutter-engine-source"; + inherit version; + + inherit (tools) depot_tools; + + nativeBuildInputs = [ + curl + pkg-config + git + tools.cipd + (python3.withPackages ( + ps: with ps; [ + httplib2 + six + ] + )) + ]; + + gclient = writeText "flutter-engine-${version}.gclient" '' + solutions = [{ + "managed": False, + "name": "src/flutter", + "url": "${url}", + }] + ''; + + NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; + GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt"; + SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; + DEPOT_TOOLS_UPDATE = "0"; + DEPOT_TOOLS_COLLECT_METRICS = "0"; + PYTHONDONTWRITEBYTECODE = "1"; + + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = hashes.${targetPlatform.system} or (throw "Hash not set for ${targetPlatform.system}"); + } + '' + source ${../../../../build-support/fetchgit/deterministic-git} + export -f clean_git + export -f make_deterministic_repo + + mkdir -p $out + cp $gclient $out/.gclient + cd $out + + export PATH=$PATH:$depot_tools + python3 $depot_tools/gclient.py sync --no-history --shallow --nohooks + find $out -name '.git' -exec dirname {} \; | xargs bash -c 'make_deterministic_repo $@' _ + find $out -path '*/.git/*' ! -name 'HEAD' -prune -exec rm -rf {} \; + find $out -name '.git' -exec mkdir {}/logs \; + find $out -name '.git' -exec cp {}/HEAD {}/logs/HEAD \; + + python3 src/build/linux/sysroot_scripts/install-sysroot.py --arch=${constants.arch} + + rm -rf $out/.cipd $out/.gclient $out/.gclient_entries $out/.gclient_previous_custom_vars $out/.gclient_previous_sync_commits + '' diff --git a/pkgs/development/compilers/flutter/engine/tools.nix b/pkgs/development/compilers/flutter/engine/tools.nix new file mode 100644 index 000000000000..a35398058181 --- /dev/null +++ b/pkgs/development/compilers/flutter/engine/tools.nix @@ -0,0 +1,62 @@ +{ + callPackage, + fetchgit, + fetchurl, + writeText, + runCommand, + hostPlatform, + darwin, + writeShellScriptBin, + depot_toolsCommit ? "7d95eb2eb054447592585c73a8ff7adad97ecba1", + depot_toolsHash ? "sha256-F7KDuVg11qLKkohIjuXpNdxpnSsT6Z3hE9+wFIG2sSk=", + cipdCommit ? "89ada246fcbf10f330011e4991d017332af2365b", + cipdHashes ? { + "linux-386" = "7f264198598af2ef9d8878349d33c1940f1f3739e46d986962c352ec4cce2690"; + "linux-amd64" = "2ada6b46ad1cd1350522c5c05899d273f5c894c7665e30104e7f57084a5aeeb9"; + "linux-arm64" = "96eca7e49f6732c50122b94b793c3a5e62ed77bce1686787a8334906791b4168"; + "linux-armv6l" = "06394601130652c5e1b055a7e4605c21fc7c6643af0b3b3cac8d2691491afa81"; + "linux-mips64" = "f3eda6542b381b7aa8f582698498b0e197972c894590ec35f18faa467c868f5c"; + "linux-mips64le" = "74229ada8e2afd9c8e7c58991126869b2880547780d4a197a27c1dfa96851622"; + "linux-mipsle" = "2f3c18ec0ad48cd44a9ff39bb60e9afded83ca43fb9c7a5ea9949f6fdd4e1394"; + "linux-ppc64" = "79425c0795fb8ba12b39a8856bf7ccb853e85def4317aa6413222f307d4c2dbd"; + "linux-ppc64le" = "f9b3d85dde70f1b78cd7a41d2477834c15ac713a59317490a4cdac9f8f092325"; + "linux-riscv64" = "bd695164563a66e8d3799e8835f90a398fbae9a4eec24e876c92d5f213943482"; + "linux-s390x" = "6f501af80541e733fda23b4208a21ea05919c95d236036a2121e6b6334a2792c"; + "macos-amd64" = "41d05580c0014912d6c32619c720646fd136e4557c9c7d7571ecc8c0462733a1"; + "macos-arm64" = "dc672bd16d9faf277dd562f1dc00644b10c03c5d838d3cc3d3ea29925d76d931"; + "windows-386" = "fa6ed0022a38ffc51ff8a927e3947fe7e59a64b2019dcddca9d3afacf7630444"; + "windows-amd64" = "b5423e4b4429837f7fe4d571ce99c068aa0ccb37ddbebc1978a423fd2b0086df"; + }, +}: +let + constants = callPackage ./constants.nix { targetPlatform = hostPlatform; }; +in +{ + depot_tools = fetchgit { + url = "https://chromium.googlesource.com/chromium/tools/depot_tools.git"; + rev = depot_toolsCommit; + hash = depot_toolsHash; + }; + + cipd = + runCommand "cipd-${cipdCommit}" + { + unwrapped = fetchurl { + name = "cipd-${cipdCommit}-unwrapped"; + url = "https://chrome-infra-packages.appspot.com/client?platform=${constants.platform}&version=git_revision:${cipdCommit}"; + sha256 = cipdHashes.${constants.platform}; + }; + } + '' + mkdir -p $out/bin + install -m755 $unwrapped $out/bin/cipd + ''; + + vpython = + pythonPkg: + runCommand "vpython3" { } "mkdir -p $out/bin && ln -s ${pythonPkg}/bin/python $out/bin/vpython3"; + + xcode-select = writeShellScriptBin "xcode-select" '' + echo ${darwin.xcode}/Contents/Developer + ''; +} diff --git a/pkgs/development/compilers/flutter/flutter.nix b/pkgs/development/compilers/flutter/flutter.nix index 2db287a45a90..757766d03152 100644 --- a/pkgs/development/compilers/flutter/flutter.nix +++ b/pkgs/development/compilers/flutter/flutter.nix @@ -1,5 +1,10 @@ -{ version +{ useNixpkgsEngine ? false +, version , engineVersion +, engineHashes ? {} +, engineUrl ? "https://github.com/flutter/engine.git@${engineVersion}" +, enginePatches ? [] +, engineRuntimeModes ? [ "release" "debug" ] , patches , channel , dart @@ -21,9 +26,20 @@ inherit pubspecLock; systemPlatform = stdenv.hostPlatform.system; } -}: +}@args: let + engine = if args.useNixpkgsEngine or false then + callPackage ./engine/default.nix { + dartSdkVersion = dart.version; + flutterVersion = version; + version = engineVersion; + hashes = engineHashes; + url = engineUrl; + patches = enginePatches; + runtimeModes = engineRuntimeModes; + } else null; + unwrapped = stdenv.mkDerivation { name = "flutter-${version}-unwrapped"; @@ -125,12 +141,15 @@ let ''; passthru = { + # TODO: rely on engine.version instead of engineVersion inherit dart engineVersion artifactHashes channel; tools = flutterTools; # The derivation containing the original Flutter SDK files. # When other derivations wrap this one, any unmodified files # found here should be included as-is, for tooling compatibility. sdk = unwrapped; + } // lib.optionalAttrs (engine != null && engine.meta.available) { + inherit engine; }; meta = with lib; { diff --git a/pkgs/development/compilers/flutter/update/get-engine-hashes.nix.in b/pkgs/development/compilers/flutter/update/get-engine-hashes.nix.in new file mode 100644 index 000000000000..f61b9b14fd07 --- /dev/null +++ b/pkgs/development/compilers/flutter/update/get-engine-hashes.nix.in @@ -0,0 +1,23 @@ +{ callPackage, symlinkJoin, lib }: +let + nixpkgsRoot = "@nixpkgs_root@"; + engineVersion = "@engine_version@"; + + systemPlatforms = [ + "x86_64-linux" + "aarch64-linux" + ]; + + derivations = builtins.map + (systemPlatform: callPackage "${nixpkgsRoot}/pkgs/development/compilers/flutter/engine/source.nix" { + targetPlatform = lib.systems.elaborate systemPlatform; + version = engineVersion; + url = "https://github.com/flutter/engine.git@${engineVersion}"; + hashes."${systemPlatform}" = lib.fakeSha256; + }) + systemPlatforms; +in +symlinkJoin { + name = "evaluate-derivations"; + paths = derivations; +} diff --git a/pkgs/development/compilers/flutter/update/update.py b/pkgs/development/compilers/flutter/update/update.py index 1e6fbe135456..a782b46514a9 100755 --- a/pkgs/development/compilers/flutter/update/update.py +++ b/pkgs/development/compilers/flutter/update/update.py @@ -85,6 +85,32 @@ def nix_build_to_fail(code): return stderr +def get_engine_hashes(engine_version): + code = load_code("get-engine-hashes.nix", + nixpkgs_root=NIXPKGS_ROOT, + engine_version=engine_version) + + stderr = nix_build_to_fail(code) + + pattern = re.compile( + r"/nix/store/.*-flutter-engine-source-(.+?)-(.+?).drv':\n\s+specified: .*\n\s+got:\s+(.+?)\n") + matches = pattern.findall(stderr) + result_dict = {} + + for match in matches: + _, system, got = match + result_dict[system] = got + + def sort_dict_recursive(d): + return { + k: sort_dict_recursive(v) if isinstance( + v, dict) else v for k, v in sorted( + d.items())} + result_dict = sort_dict_recursive(result_dict) + + return result_dict + + def get_artifact_hashes(flutter_compact_version): code = load_code("get-artifact-hashes.nix", nixpkgs_root=NIXPKGS_ROOT, @@ -180,6 +206,7 @@ def write_data( flutter_version, channel, engine_hash, + engine_hashes, dart_version, dart_hash, flutter_hash, @@ -190,6 +217,7 @@ def write_data( "version": flutter_version, "engineVersion": engine_hash, "channel": channel, + "engineHashes": engine_hashes, "dartVersion": dart_version, "dartHash": dart_hash, "flutterHash": flutter_hash, @@ -205,7 +233,9 @@ def update_all_packages(): int(x.split('_')[0]), int(x.split('_')[1])), reverse=True) new_content = [ - "flutterPackages = recurseIntoAttrs (callPackage ../development/compilers/flutter { });", + "flutterPackages-bin = recurseIntoAttrs (callPackage ../development/compilers/flutter { });", + "flutterPackages-source = recurseIntoAttrs (callPackage ../development/compilers/flutter { useNixpkgsEngine = true; });", + "flutterPackages = flutterPackages-bin;" "flutter = flutterPackages.stable;", ] + [f"flutter{version.replace('_', '')} = flutterPackages.v{version};" for version in versions] @@ -215,7 +245,7 @@ def update_all_packages(): start = -1 end = -1 for i, line in enumerate(lines): - if "flutterPackages = recurseIntoAttrs (callPackage ../development/compilers/flutter { });" in line: + if "flutterPackages-bin = recurseIntoAttrs (callPackage ../development/compilers/flutter { });" in line: start = i if start != -1 and len(line.strip()) == 0: end = i @@ -329,6 +359,7 @@ def main(): write_data( pubspec_lock={}, artifact_hashes={}, + engine_hashes={}, **common_data_args) pubspec_lock = get_pubspec_lock(flutter_compact_version, flutter_src) @@ -336,6 +367,7 @@ def main(): write_data( pubspec_lock=pubspec_lock, artifact_hashes={}, + engine_hashes={}, **common_data_args) artifact_hashes = get_artifact_hashes(flutter_compact_version) @@ -343,6 +375,15 @@ def main(): write_data( pubspec_lock=pubspec_lock, artifact_hashes=artifact_hashes, + engine_hashes={}, + **common_data_args) + + engine_hashes = get_engine_hashes(engine_hash) + + write_data( + pubspec_lock=pubspec_lock, + artifact_hashes=artifact_hashes, + engine_hashes=engine_hashes, **common_data_args) diff --git a/pkgs/development/compilers/flutter/versions/3_13/data.json b/pkgs/development/compilers/flutter/versions/3_13/data.json index 3f68f8613368..eb707f74f7c2 100644 --- a/pkgs/development/compilers/flutter/versions/3_13/data.json +++ b/pkgs/development/compilers/flutter/versions/3_13/data.json @@ -2,6 +2,9 @@ "version": "3.13.8", "engineVersion": "767d8c75e898091b925519803830fc2721658d07", "channel": "stable", + "engineHashes": { + "aarch64-linux": "sha256-1s7I+AWb2kNDzJ5k2XYm7rSK8yj1wqTjPUuS0f85Jig=" + }, "dartVersion": "3.1.4", "dartHash": { "x86_64-linux": "sha256-42wrqzjRcFDWw2aEY6+/faX+QE9PA8FmRWP4M/NkgBE=", diff --git a/pkgs/development/compilers/flutter/versions/3_16/data.json b/pkgs/development/compilers/flutter/versions/3_16/data.json index fcd5975778d0..477328b4aa6b 100644 --- a/pkgs/development/compilers/flutter/versions/3_16/data.json +++ b/pkgs/development/compilers/flutter/versions/3_16/data.json @@ -2,6 +2,9 @@ "version": "3.16.7", "engineVersion": "4a585b79294e830fa89c24924d58a27cc8fbf406", "channel": "stable", + "engineHashes": { + "aarch64-linux": "sha256-xqniT1rYrzCuq6542KfqWRigYtLnmaT0z5Es/59iFMw=" + }, "dartVersion": "3.2.4", "dartHash": { "x86_64-linux": "sha256-qslf+wgmNz9r+e45o3Bg9/vDj75GkM9gQE2tb5rbIvw=", diff --git a/pkgs/development/compilers/flutter/versions/3_19/data.json b/pkgs/development/compilers/flutter/versions/3_19/data.json index e4bcedc110d8..c09d3e99a3ca 100644 --- a/pkgs/development/compilers/flutter/versions/3_19/data.json +++ b/pkgs/development/compilers/flutter/versions/3_19/data.json @@ -2,6 +2,11 @@ "version": "3.19.4", "engineVersion": "a5c24f538d05aaf66f7972fb23959d8cafb9f95a", "channel": "stable", + "engineHashes": { + "x86_64-linux": "sha256-xhihh4v9bh2ZxAewKEdhpXerLDoXFm8YO72+tGRnkCw=", + "aarch64-linux": "sha256-mUimQRg0UqvTueuDWO8Isy0FKOxJLvVZrehv4SMj0XY=", + "aarch64-darwin": "sha256-5DcD7ebrANznB++QOQOoynr1aOgJqTF8QfSihQnghoY=" + }, "dartVersion": "3.3.2", "dartHash": { "x86_64-linux": "sha256-eO8qcSQNWGEz/5oVaJ5tjRMnGy2aq3PbcF15z/Pi3xQ=", diff --git a/pkgs/development/compilers/flutter/versions/3_19/engine/patches/flutter-140969.patch b/pkgs/development/compilers/flutter/versions/3_19/engine/patches/flutter-140969.patch new file mode 100644 index 000000000000..bf5d9320a0a3 --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_19/engine/patches/flutter-140969.patch @@ -0,0 +1,41 @@ +From dd74740ddceac81e748a7e7834c28135abc59454 Mon Sep 17 00:00:00 2001 +From: Brandon DeRosier +Date: Tue, 16 Jan 2024 11:00:34 -0800 +Subject: [PATCH] [Flutter GPU] Fix playground shader paths. (#49790) + +Resolves https://github.com/flutter/flutter/issues/140969. + +Makes the shader paths absolute to prevent issues caused by the working +directory differing across build environments. +--- + impeller/fixtures/BUILD.gn | 3 ++- + impeller/tools/impeller.gni | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/impeller/fixtures/BUILD.gn b/impeller/fixtures/BUILD.gn +index 9165f06542a2a..5ea90ab3969f3 100644 +--- a/impeller/fixtures/BUILD.gn ++++ b/impeller/fixtures/BUILD.gn +@@ -131,7 +131,8 @@ + "flutter_gpu_texture.vert", + ] + shader_target_flags = [ "--runtime-stage-metal" ] +- shader_bundle = "{\"UnlitFragment\": {\"type\": \"fragment\", \"file\": \"../../flutter/impeller/fixtures/flutter_gpu_unlit.frag\"}, \"UnlitVertex\": {\"type\": \"vertex\", \"file\": \"../../flutter/impeller/fixtures/flutter_gpu_unlit.vert\"}, \"TextureFragment\": {\"type\": \"fragment\", \"file\": \"../../flutter/impeller/fixtures/flutter_gpu_texture.frag\"}, \"TextureVertex\": {\"type\": \"vertex\", \"file\": \"../../flutter/impeller/fixtures/flutter_gpu_texture.vert\"}}" ++ fixtures = rebase_path("//flutter/impeller/fixtures") ++ shader_bundle = "{\"UnlitFragment\": {\"type\": \"fragment\", \"file\": \"${fixtures}/flutter_gpu_unlit.frag\"}, \"UnlitVertex\": {\"type\": \"vertex\", \"file\": \"${fixtures}/flutter_gpu_unlit.vert\"}, \"TextureFragment\": {\"type\": \"fragment\", \"file\": \"${fixtures}/flutter_gpu_texture.frag\"}, \"TextureVertex\": {\"type\": \"vertex\", \"file\": \"${fixtures}/flutter_gpu_texture.vert\"}}" + shader_bundle_output = "playground.shaderbundle" + } + +diff --git a/impeller/tools/impeller.gni b/impeller/tools/impeller.gni +index 6541c3b12173b..2ab7ec0f0b07a 100644 +--- a/impeller/tools/impeller.gni ++++ b/impeller/tools/impeller.gni +@@ -313,7 +313,7 @@ + if (defined(invoker.shader_bundle)) { + assert( + defined(invoker.shader_bundle_output), +- "When shader_bundle is specified, shader_output_bundle must also be specified.") ++ "When shader_bundle is specified, shader_bundle_output must also be specified.") + } + + sksl = false diff --git a/pkgs/development/compilers/flutter/versions/3_22/data.json b/pkgs/development/compilers/flutter/versions/3_22/data.json index 12da5e9b418a..968fde9d7b27 100644 --- a/pkgs/development/compilers/flutter/versions/3_22/data.json +++ b/pkgs/development/compilers/flutter/versions/3_22/data.json @@ -2,6 +2,10 @@ "version": "3.22.2", "engineVersion": "edd8546116457bdf1c5bdfb13ecb9463d2bb5ed4", "channel": "stable", + "engineHashes": { + "aarch64-linux": "sha256-xPVhLxO9AgXC2+Hwm1lWRfNZhLwZHdKW92WXgv3ImZk=", + "x86_64-linux": "sha256-klODJpmlWynYx+MqqGGeTzzPtmQTEUV47hnzjIVDCK8=" + }, "dartVersion": "3.4.3", "dartHash": { "x86_64-linux": "sha256-wDIdoWoKlutP8kixd12Lppzv2aYeiTJ1A1Sy6lguXgg=", diff --git a/pkgs/development/compilers/flutter/versions/3_23/data.json b/pkgs/development/compilers/flutter/versions/3_23/data.json index 0bfbb69af151..3c3fedbdecae 100644 --- a/pkgs/development/compilers/flutter/versions/3_23/data.json +++ b/pkgs/development/compilers/flutter/versions/3_23/data.json @@ -2,6 +2,9 @@ "version": "3.23.0-0.1.pre", "engineVersion": "bb10c5466638e963479ba5e64e601e42d1a43447", "channel": "beta", + "engineHashes": { + "aarch64-linux": "sha256-WHWxYOHd3jxE5CQNt0+9qxlsCLK5y9iJsVERtJ4Ylbk=" + }, "dartVersion": "3.5.0-180.3.beta", "dartHash": { "x86_64-linux": "sha256-DXGyUTu9I602lLnDz9BKLfHEAeaMKtbZjxgmPPSTEv0=", diff --git a/pkgs/development/compilers/flutter/wrapper.nix b/pkgs/development/compilers/flutter/wrapper.nix index f5b8b2e2059d..4b20cf7f43f0 100644 --- a/pkgs/development/compilers/flutter/wrapper.nix +++ b/pkgs/development/compilers/flutter/wrapper.nix @@ -145,7 +145,10 @@ in mkdir -p $out/bin makeWrapper '${immutableFlutter}' $out/bin/flutter \ --set-default ANDROID_EMULATOR_USE_SYSTEM_LIBS 1 \ - --suffix PATH : '${lib.makeBinPath (tools ++ buildTools)}' \ + '' + lib.optionalString (flutter ? engine && flutter.engine.meta.available) '' + --set-default FLUTTER_ENGINE "${flutter.engine}" \ + --add-flags "--local-engine-host host_${flutter.engine.runtimeMode}${lib.optionalString (!flutter.engine.isOptimized) "_unopt"}" \ + '' + '' --suffix PATH : '${lib.makeBinPath (tools ++ buildTools)}' \ --suffix PKG_CONFIG_PATH : "$FLUTTER_PKG_CONFIG_PATH" \ --suffix LIBRARY_PATH : '${lib.makeLibraryPath appStaticBuildDeps}' \ --prefix CXXFLAGS "''\t" '${builtins.concatStringsSep " " (includeFlags ++ extraCxxFlags)}' \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f73c7a022905..58678d3a4165 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15367,7 +15367,9 @@ with pkgs; fluidd = callPackage ../applications/misc/fluidd { }; - flutterPackages = recurseIntoAttrs (callPackage ../development/compilers/flutter { }); + flutterPackages-bin = recurseIntoAttrs (callPackage ../development/compilers/flutter { }); + flutterPackages-source = recurseIntoAttrs (callPackage ../development/compilers/flutter { useNixpkgsEngine = true; }); + flutterPackages = flutterPackages-bin; flutter = flutterPackages.stable; flutter323 = flutterPackages.v3_23; flutter322 = flutterPackages.v3_22; From 4a59129384d0d0187c4f20f1a0a62b8da9bf5f43 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Mon, 10 Jun 2024 20:03:32 -0700 Subject: [PATCH 15/26] buildFlutterApplication: use the engine --- pkgs/build-support/flutter/default.nix | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/build-support/flutter/default.nix b/pkgs/build-support/flutter/default.nix index dd4341c675dc..ff6c6b31006f 100644 --- a/pkgs/build-support/flutter/default.nix +++ b/pkgs/build-support/flutter/default.nix @@ -14,16 +14,28 @@ # absolutely no mac support for now -{ pubGetScript ? "flutter pub get" +{ pubGetScript ? null , flutterBuildFlags ? [ ] , targetFlutterPlatform ? "linux" , extraWrapProgramArgs ? "" +, flutterMode ? null , ... }@args: let + hasEngine = flutter ? engine && flutter.engine != null && flutter.engine.meta.available; + flutterMode = args.flutterMode or (if hasEngine then flutter.engine.runtimeMode else "release"); + + flutterFlags = lib.optional hasEngine "--local-engine host_${flutterMode}${lib.optionalString (!flutter.engine.isOptimized) "_unopt"}"; + + flutterBuildFlags = [ + "--${flutterMode}" + ] ++ (args.flutterBuildFlags or []) ++ flutterFlags; + builderArgs = rec { universal = args // { + inherit flutterMode flutterFlags flutterBuildFlags; + sdkSetupScript = '' # Pub needs SSL certificates. Dart normally looks in a hardcoded path. # https://github.com/dart-lang/sdk/blob/3.1.0/runtime/bin/security_context_linux.cc#L48 @@ -46,11 +58,11 @@ let ''}/bin/dart" export HOME="$NIX_BUILD_TOP" - flutter config --no-analytics &>/dev/null # mute first-run - flutter config --enable-linux-desktop >/dev/null + flutter config $flutterFlags --no-analytics &>/dev/null # mute first-run + flutter config $flutterFlags --enable-linux-desktop >/dev/null ''; - inherit pubGetScript; + pubGetScript = args.pubGetScript or "flutter${lib.optionalString hasEngine " --local-engine $flutterMode"} pub get"; sdkSourceBuilders = { # https://github.com/dart-lang/pub/blob/68dc2f547d0a264955c1fa551fa0a0e158046494/lib/src/sdk/flutter.dart#L81 @@ -122,7 +134,7 @@ let mkdir -p build/flutter_assets/fonts - flutter build linux -v --release --split-debug-info="$debug" ${builtins.concatStringsSep " " (map (flag: "\"${flag}\"") flutterBuildFlags)} + flutter build linux -v --split-debug-info="$debug" $flutterBuildFlags runHook postBuild ''; @@ -131,7 +143,7 @@ let installPhase = universal.installPhase or '' runHook preInstall - built=build/linux/*/release/bundle + built=build/linux/*/$flutterMode/bundle mkdir -p $out/bin mv $built $out/app @@ -173,7 +185,7 @@ let mkdir -p build/flutter_assets/fonts - flutter build web -v --release ${builtins.concatStringsSep " " (map (flag: "\"${flag}\"") flutterBuildFlags)} + flutter build web -v $flutterBuildFlags runHook postBuild ''; From 2be74bd88f619929813674f1a6fca159e1f017b8 Mon Sep 17 00:00:00 2001 From: hlad Date: Sat, 15 Jun 2024 11:06:04 +0200 Subject: [PATCH 16/26] libreoffice: add Slovak language --- pkgs/applications/office/libreoffice/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix index 7007b59b3012..28ffe6d11bbe 100644 --- a/pkgs/applications/office/libreoffice/default.nix +++ b/pkgs/applications/office/libreoffice/default.nix @@ -97,7 +97,7 @@ , libetonyek , liborcus , libpng -, langs ? [ "ar" "ca" "cs" "da" "de" "en-GB" "en-US" "eo" "es" "fi" "fr" "hu" "it" "ja" "nl" "pl" "pt" "pt-BR" "ro" "ru" "sl" "tr" "uk" "zh-CN" ] +, langs ? [ "ar" "ca" "cs" "da" "de" "en-GB" "en-US" "eo" "es" "fi" "fr" "hu" "it" "ja" "nl" "pl" "pt" "pt-BR" "ro" "ru" "sk" "sl" "tr" "uk" "zh-CN" ] , withHelp ? true , kdeIntegration ? false , qtbase ? null From 919226fbc66d3c8b06437a735b1a39b4590a9b08 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sat, 15 Jun 2024 14:27:26 +0200 Subject: [PATCH 17/26] arc-icon-theme: use upstream version number --- pkgs/data/icons/arc-icon-theme/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/data/icons/arc-icon-theme/default.nix b/pkgs/data/icons/arc-icon-theme/default.nix index 2950f929912a..a185160d4a3e 100644 --- a/pkgs/data/icons/arc-icon-theme/default.nix +++ b/pkgs/data/icons/arc-icon-theme/default.nix @@ -2,13 +2,13 @@ stdenvNoCC.mkDerivation rec { pname = "arc-icon-theme"; - version = "2016-11-22"; + version = "20161122"; src = fetchFromGitHub { owner = "horst3180"; - repo = pname; - rev = "55a575386a412544c3ed2b5617a61f842ee4ec15"; - sha256 = "1ch3hp08qri93510hypzz6m2x4xgg2h15wvnhjwh1x1s1b7jvxjd"; + repo = "arc-icon-theme"; + rev = version; + hash = "sha256-TfYtzwo69AC5hHbzEqB4r5Muqvn/eghCGSlmjMCFA7I="; }; nativeBuildInputs = [ From 4b1d39d9359bb49f0d9abd72db2ae1f265e77aa4 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 15 Jun 2024 12:37:52 +0100 Subject: [PATCH 18/26] =?UTF-8?q?treewide:=20remove=20myself=20from=20pack?= =?UTF-8?q?ages=20I=20don=E2=80=99t=20use?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’ve had an extended absence from Nix work and no longer actively use a bunch of packages I used to maintain, so remove myself as a maintainer from things I can’t usefully review/test changes for as I ease back into things. This does unfortunately leave a few packages orphaned (`stm32loader`, `tinyprog`, `python3Packages.fx2`, and `python3Packages.jsonmerge`). --- .../networking/instant-messengers/gomuks/default.nix | 2 +- .../networking/irc/weechat/scripts/weechat-autosort/default.nix | 2 +- .../networking/irc/weechat/scripts/weechat-matrix/default.nix | 2 +- pkgs/applications/science/logic/symbiyosys/default.nix | 2 +- pkgs/by-name/ne/nextpnr/package.nix | 2 +- pkgs/development/compilers/yosys/default.nix | 2 +- pkgs/development/embedded/blackmagic/default.nix | 2 +- pkgs/development/embedded/fpga/icestorm/default.nix | 2 +- pkgs/development/embedded/fpga/tinyprog/default.nix | 2 +- pkgs/development/embedded/fpga/trellis/default.nix | 2 +- pkgs/development/python-modules/amaranth-boards/default.nix | 1 - pkgs/development/python-modules/amaranth-soc/default.nix | 1 - pkgs/development/python-modules/amaranth/default.nix | 1 - pkgs/development/python-modules/fx2/default.nix | 2 +- pkgs/development/python-modules/jsonmerge/default.nix | 2 +- pkgs/development/python-modules/matrix-nio/default.nix | 1 - pkgs/development/python-modules/pyvcd/default.nix | 1 - pkgs/development/python-modules/stm32loader/default.nix | 2 +- pkgs/servers/http/openresty/default.nix | 2 +- pkgs/tools/misc/glasgow/default.nix | 2 +- 20 files changed, 15 insertions(+), 20 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/gomuks/default.nix b/pkgs/applications/networking/instant-messengers/gomuks/default.nix index e25a94d0bef8..26b0e9c0225d 100644 --- a/pkgs/applications/networking/instant-messengers/gomuks/default.nix +++ b/pkgs/applications/networking/instant-messengers/gomuks/default.nix @@ -53,6 +53,6 @@ buildGoModule rec { description = "A terminal based Matrix client written in Go"; mainProgram = "gomuks"; license = licenses.agpl3Plus; - maintainers = with maintainers; [ chvp emily ]; + maintainers = with maintainers; [ chvp ]; }; } diff --git a/pkgs/applications/networking/irc/weechat/scripts/weechat-autosort/default.nix b/pkgs/applications/networking/irc/weechat/scripts/weechat-autosort/default.nix index c20d8f0a8079..010470c6fbaa 100644 --- a/pkgs/applications/networking/irc/weechat/scripts/weechat-autosort/default.nix +++ b/pkgs/applications/networking/irc/weechat/scripts/weechat-autosort/default.nix @@ -20,6 +20,6 @@ stdenv.mkDerivation rec { description = "Autosort is a weechat script to automatically or manually keep your buffers sorted"; homepage = "https://github.com/de-vri-es/weechat-autosort"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ emily flokli ]; + maintainers = with maintainers; [ flokli ]; }; } diff --git a/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix/default.nix b/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix/default.nix index b8bb3bc3b237..a67903c6fe98 100644 --- a/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix/default.nix +++ b/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix/default.nix @@ -99,6 +99,6 @@ in buildPythonPackage { homepage = "https://github.com/poljar/weechat-matrix"; license = licenses.isc; platforms = platforms.unix; - maintainers = with maintainers; [ tilpner emily ]; + maintainers = with maintainers; [ tilpner ]; }; } diff --git a/pkgs/applications/science/logic/symbiyosys/default.nix b/pkgs/applications/science/logic/symbiyosys/default.nix index 19c021684b3f..c3df8340d20c 100644 --- a/pkgs/applications/science/logic/symbiyosys/default.nix +++ b/pkgs/applications/science/logic/symbiyosys/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation { description = "Tooling for Yosys-based verification flows"; homepage = "https://symbiyosys.readthedocs.io/"; license = lib.licenses.isc; - maintainers = with lib.maintainers; [ thoughtpolice emily ]; + maintainers = with lib.maintainers; [ thoughtpolice ]; mainProgram = "sby"; platforms = lib.platforms.all; }; diff --git a/pkgs/by-name/ne/nextpnr/package.nix b/pkgs/by-name/ne/nextpnr/package.nix index e164a38d9564..49c86cfc2ab3 100644 --- a/pkgs/by-name/ne/nextpnr/package.nix +++ b/pkgs/by-name/ne/nextpnr/package.nix @@ -89,6 +89,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/yosyshq/nextpnr"; license = licenses.isc; platforms = platforms.all; - maintainers = with maintainers; [ thoughtpolice emily ]; + maintainers = with maintainers; [ thoughtpolice ]; }; } diff --git a/pkgs/development/compilers/yosys/default.nix b/pkgs/development/compilers/yosys/default.nix index ee8fe6cee576..3205f5b22dcd 100644 --- a/pkgs/development/compilers/yosys/default.nix +++ b/pkgs/development/compilers/yosys/default.nix @@ -171,6 +171,6 @@ in stdenv.mkDerivation (finalAttrs: { homepage = "https://yosyshq.net/yosys/"; license = licenses.isc; platforms = platforms.all; - maintainers = with maintainers; [ shell thoughtpolice emily Luflosi ]; + maintainers = with maintainers; [ shell thoughtpolice Luflosi ]; }; }) diff --git a/pkgs/development/embedded/blackmagic/default.nix b/pkgs/development/embedded/blackmagic/default.nix index 893a0c889fad..bb09ade35f2f 100644 --- a/pkgs/development/embedded/blackmagic/default.nix +++ b/pkgs/development/embedded/blackmagic/default.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { ''; homepage = "https://github.com/blacksphere/blackmagic"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ pjones emily sorki ]; + maintainers = with maintainers; [ pjones sorki ]; platforms = platforms.unix; }; } diff --git a/pkgs/development/embedded/fpga/icestorm/default.nix b/pkgs/development/embedded/fpga/icestorm/default.nix index b660571eb3e5..f6f7e46db56c 100644 --- a/pkgs/development/embedded/fpga/icestorm/default.nix +++ b/pkgs/development/embedded/fpga/icestorm/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { ''; homepage = "https://github.com/YosysHQ/icestorm/"; license = lib.licenses.isc; - maintainers = with lib.maintainers; [ shell thoughtpolice emily ]; + maintainers = with lib.maintainers; [ shell thoughtpolice ]; platforms = lib.platforms.all; }; } diff --git a/pkgs/development/embedded/fpga/tinyprog/default.nix b/pkgs/development/embedded/fpga/tinyprog/default.nix index e5a448b6fb3d..b5a9937ad2af 100644 --- a/pkgs/development/embedded/fpga/tinyprog/default.nix +++ b/pkgs/development/embedded/fpga/tinyprog/default.nix @@ -34,7 +34,7 @@ with python3Packages; buildPythonApplication rec { homepage = "https://github.com/tinyfpga/TinyFPGA-Bootloader/tree/master/programmer"; description = "Programmer for FPGA boards using the TinyFPGA USB Bootloader"; mainProgram = "tinyprog"; - maintainers = with maintainers; [ emily ]; + maintainers = with maintainers; [ ]; license = licenses.asl20; }; } diff --git a/pkgs/development/embedded/fpga/trellis/default.nix b/pkgs/development/embedded/fpga/trellis/default.nix index f0ff4a47b4c3..b652f57fa81a 100644 --- a/pkgs/development/embedded/fpga/trellis/default.nix +++ b/pkgs/development/embedded/fpga/trellis/default.nix @@ -64,7 +64,7 @@ in stdenv.mkDerivation rec { ''; homepage = "https://github.com/YosysHQ/prjtrellis"; license = licenses.isc; - maintainers = with maintainers; [ q3k thoughtpolice emily rowanG077 ]; + maintainers = with maintainers; [ q3k thoughtpolice rowanG077 ]; platforms = platforms.all; }; } diff --git a/pkgs/development/python-modules/amaranth-boards/default.nix b/pkgs/development/python-modules/amaranth-boards/default.nix index 19e61f789cbb..3e9548bfe5b6 100644 --- a/pkgs/development/python-modules/amaranth-boards/default.nix +++ b/pkgs/development/python-modules/amaranth-boards/default.nix @@ -45,7 +45,6 @@ buildPythonPackage rec { homepage = "https://github.com/amaranth-lang/amaranth-boards"; license = licenses.bsd2; maintainers = with maintainers; [ - emily thoughtpolice pbsds ]; diff --git a/pkgs/development/python-modules/amaranth-soc/default.nix b/pkgs/development/python-modules/amaranth-soc/default.nix index 78cdea45edff..aee85e709aff 100644 --- a/pkgs/development/python-modules/amaranth-soc/default.nix +++ b/pkgs/development/python-modules/amaranth-soc/default.nix @@ -38,7 +38,6 @@ buildPythonPackage rec { homepage = "https://github.com/amaranth-lang/amaranth-soc"; license = licenses.bsd2; maintainers = with maintainers; [ - emily thoughtpolice pbsds ]; diff --git a/pkgs/development/python-modules/amaranth/default.nix b/pkgs/development/python-modules/amaranth/default.nix index 00d40dd1460b..1a096f01606f 100644 --- a/pkgs/development/python-modules/amaranth/default.nix +++ b/pkgs/development/python-modules/amaranth/default.nix @@ -58,7 +58,6 @@ buildPythonPackage rec { homepage = "https://amaranth-lang.org/docs/amaranth"; license = licenses.bsd2; maintainers = with maintainers; [ - emily thoughtpolice pbsds ]; diff --git a/pkgs/development/python-modules/fx2/default.nix b/pkgs/development/python-modules/fx2/default.nix index 6b2dcccc67af..52711cead2d0 100644 --- a/pkgs/development/python-modules/fx2/default.nix +++ b/pkgs/development/python-modules/fx2/default.nix @@ -46,6 +46,6 @@ buildPythonPackage rec { mainProgram = "fx2tool"; homepage = "https://github.com/whitequark/libfx2"; license = licenses.bsd0; - maintainers = with maintainers; [ emily ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/jsonmerge/default.nix b/pkgs/development/python-modules/jsonmerge/default.nix index 9f636ab57f4e..5879be3b5359 100644 --- a/pkgs/development/python-modules/jsonmerge/default.nix +++ b/pkgs/development/python-modules/jsonmerge/default.nix @@ -26,6 +26,6 @@ buildPythonPackage rec { homepage = "https://github.com/avian2/jsonmerge"; changelog = "https://github.com/avian2/jsonmerge/blob/jsonmerge-${version}/ChangeLog"; license = licenses.mit; - maintainers = with maintainers; [ emily ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/matrix-nio/default.nix b/pkgs/development/python-modules/matrix-nio/default.nix index 738f05f28e8a..ce9aded24b3b 100644 --- a/pkgs/development/python-modules/matrix-nio/default.nix +++ b/pkgs/development/python-modules/matrix-nio/default.nix @@ -112,7 +112,6 @@ buildPythonPackage rec { license = licenses.isc; maintainers = with maintainers; [ tilpner - emily symphorien ]; }; diff --git a/pkgs/development/python-modules/pyvcd/default.nix b/pkgs/development/python-modules/pyvcd/default.nix index 1a1e912c9b50..3b4c2db06636 100644 --- a/pkgs/development/python-modules/pyvcd/default.nix +++ b/pkgs/development/python-modules/pyvcd/default.nix @@ -32,7 +32,6 @@ buildPythonPackage rec { license = licenses.mit; maintainers = with maintainers; [ sb0 - emily ]; }; } diff --git a/pkgs/development/python-modules/stm32loader/default.nix b/pkgs/development/python-modules/stm32loader/default.nix index 9434e25ecc31..6578e3c11957 100644 --- a/pkgs/development/python-modules/stm32loader/default.nix +++ b/pkgs/development/python-modules/stm32loader/default.nix @@ -50,6 +50,6 @@ buildPythonPackage rec { homepage = "https://github.com/florisla/stm32loader"; changelog = "https://github.com/florisla/stm32loader/blob/v${version}/CHANGELOG.md"; license = licenses.gpl3; - maintainers = with maintainers; [ emily ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix index a33bdbcebc92..48d43dfe647f 100644 --- a/pkgs/servers/http/openresty/default.nix +++ b/pkgs/servers/http/openresty/default.nix @@ -55,6 +55,6 @@ callPackage ../nginx/generic.nix args rec { homepage = "https://openresty.org"; license = lib.licenses.bsd2; platforms = lib.platforms.all; - maintainers = with lib.maintainers; [ thoughtpolice lblasc emily ]; + maintainers = with lib.maintainers; [ thoughtpolice lblasc ]; }; } diff --git a/pkgs/tools/misc/glasgow/default.nix b/pkgs/tools/misc/glasgow/default.nix index 77f3eb01d96a..4821ad923ef8 100644 --- a/pkgs/tools/misc/glasgow/default.nix +++ b/pkgs/tools/misc/glasgow/default.nix @@ -76,7 +76,7 @@ python3.pkgs.buildPythonApplication rec { description = "Software for Glasgow, a digital interface multitool"; homepage = "https://github.com/GlasgowEmbedded/Glasgow"; license = licenses.bsd0; - maintainers = with maintainers; [ emily thoughtpolice ]; + maintainers = with maintainers; [ thoughtpolice ]; mainProgram = "glasgow"; }; } From 4b8fd7890ef0d327496a1fff796dbb477d21512f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 15 Jun 2024 16:58:30 +0000 Subject: [PATCH 19/26] thunderbird-unwrapped: 115.11.1 -> 115.12.0 --- .../networking/mailreaders/thunderbird/packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/thunderbird/packages.nix b/pkgs/applications/networking/mailreaders/thunderbird/packages.nix index 1d98adf9a58a..307a805ddf1e 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/packages.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/packages.nix @@ -5,13 +5,13 @@ rec { thunderbird-115 = (buildMozillaMach rec { pname = "thunderbird"; - version = "115.11.1"; + version = "115.12.0"; application = "comm/mail"; applicationName = "Mozilla Thunderbird"; binaryName = pname; src = fetchurl { url = "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz"; - sha512 = "1a1f438c7047908788bc983aa681c3293ce02da006477b491a49ced5941433ca3381e01f76afc6bb5572415025acfd0fa657f063ef26b3a63646594c27202717"; + sha512 = "d262ec2cea3fd003e66974b0bd8d61fb268ad2a233e54a6aea4803c5520e235ea308267f0484581ce235063c4fb90e621cdc1eea3f62212574b90427ede1c289"; }; extraPatches = [ # The file to be patched is different from firefox's `no-buildconfig-ffx90.patch`. From 7f28d49b484e533a449c1901e67ace29ca125e07 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 11 Jun 2024 11:25:51 +0200 Subject: [PATCH 20/26] nrf-udev: init at 1.0.1 --- pkgs/by-name/nr/nrf-udev/package.nix | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/by-name/nr/nrf-udev/package.nix diff --git a/pkgs/by-name/nr/nrf-udev/package.nix b/pkgs/by-name/nr/nrf-udev/package.nix new file mode 100644 index 000000000000..848199811c08 --- /dev/null +++ b/pkgs/by-name/nr/nrf-udev/package.nix @@ -0,0 +1,40 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +, gitUpdater +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "nrf-udev"; + version = "1.0.1"; + + src = fetchFromGitHub { + owner = "NordicSemiconductor"; + repo = "nrf-udev"; + rev = "v${finalAttrs.version}"; + hash = "sha256-bEIAsz9ZwX6RTzhv5/waFZ5a3KlnwX4kQs29+475zN0="; + }; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp -r nrf-udev_*/lib $out + + runHook postInstall + ''; + + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; + + meta = with lib; { + description = "Udev rules for nRF (Nordic Semiconductor) development kits"; + homepage = "https://github.com/NordicSemiconductor/nrf-udev"; + changelog = "https://github.com/NordicSemiconductor/nrf-udev/releases/tag/${finalAttrs.src.rev}"; + license = licenses.unfree; + platforms = platforms.all; + maintainers = with maintainers; [ h7x4 ]; + }; +}) From 4929499597ffc50407b0457237865353d1e790c6 Mon Sep 17 00:00:00 2001 From: Muhammad Falak R Wani Date: Sat, 15 Jun 2024 21:11:19 +0530 Subject: [PATCH 21/26] just: 1.28.0 -> 1.29.1 Diff: https://github.com/casey/just/compare/refs/tags/1.28.0...1.29.1 Changelog: https://github.com/casey/just/blob/1.29.1/CHANGELOG.md Signed-off-by: Muhammad Falak R Wani --- pkgs/by-name/ju/just/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ju/just/package.nix b/pkgs/by-name/ju/just/package.nix index df425fb5e417..bfd8127b3406 100644 --- a/pkgs/by-name/ju/just/package.nix +++ b/pkgs/by-name/ju/just/package.nix @@ -12,17 +12,17 @@ rustPlatform.buildRustPackage rec { pname = "just"; - version = "1.28.0"; + version = "1.29.1"; outputs = [ "out" "man" "doc" ]; src = fetchFromGitHub { owner = "casey"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-GdDpFY9xdjA60zr+i5O9wBWF682tvi4N/pxEob5tYoA="; + hash = "sha256-R797aRLsaDjNSaYVFUSmKCUr+HQ5xarrssHJe3fwhTw="; }; - cargoHash = "sha256-Cvl4EY57TanJK1XGVahPHGtuEAIR44qwGEPDkXfgw5I="; + cargoHash = "sha256-DVjhmJPyIRHwKTBWoIBYMJbigLpakDrXeCHQ9Y8/T48="; nativeBuildInputs = [ installShellFiles mdbook ]; buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; From ed7c5230a7654fba5cfe5dec9e75ae29a3087980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Fri, 14 Jun 2024 21:20:37 +0200 Subject: [PATCH 22/26] local-ai: 2.15.0 -> 2.16.0 --- pkgs/by-name/lo/local-ai/package.nix | 52 +++++++++++++++++++++------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/lo/local-ai/package.nix b/pkgs/by-name/lo/local-ai/package.nix index 5d582f3604a6..418a9a638419 100644 --- a/pkgs/by-name/lo/local-ai/package.nix +++ b/pkgs/by-name/lo/local-ai/package.nix @@ -94,13 +94,33 @@ let ''; }; + llama-cpp-rpc = (llama-cpp-grpc.overrideAttrs (prev: { + name = "llama-cpp-rpc"; + cmakeFlags = prev.cmakeFlags ++ [ + (lib.cmakeBool "LLAMA_AVX" false) + (lib.cmakeBool "LLAMA_AVX2" false) + (lib.cmakeBool "LLAMA_AVX512" false) + (lib.cmakeBool "LLAMA_FMA" false) + (lib.cmakeBool "LLAMA_F16C" false) + (lib.cmakeBool "LLAMA_RPC" true) + ]; + postPatch = prev.postPatch + '' + sed -i examples/rpc/CMakeLists.txt \ + -e '$a\install(TARGETS rpc-server RUNTIME)' + ''; + })).override { + cudaSupport = false; + openclSupport = false; + blasSupport = true; # TODO: set to false, when dropping 23.11 support + }; + llama-cpp-grpc = (llama-cpp.overrideAttrs (final: prev: { name = "llama-cpp-grpc"; src = fetchFromGitHub { owner = "ggerganov"; repo = "llama.cpp"; - rev = "c12452c7aec8a02264afc00196a13caa591a13ac"; - hash = "sha256-Kji8dlz7OfhPeNXnYgBHzpGGMhCsRLJ9d+EFf77Q6Co="; + rev = "74f33adf5f8b20b08fc5a6aa17ce081abe86ef2f"; + hash = "sha256-hSdHhsC5Q8pLEC2bj8Gke4/ffCts5l7LtYa9RDrpGBI="; fetchSubmodules = true; }; postPatch = prev.postPatch + '' @@ -253,8 +273,8 @@ let src = fetchFromGitHub { owner = "ggerganov"; repo = "whisper.cpp"; - rev = "73d13ad19a8c9c4da4f405088a85169b1a171e66"; - hash = "sha256-7g/J3a3behGgcJXy9ryAYXxgOYnsRMlGmux13re28AY="; + rev = "22d46b7ba4620e2db1281e210d0186863cffcec0"; + hash = "sha256-JC3GHRBjFvfQSUWRdAcMc0pol54RsqUF1+zIZYAsbC4="; }; nativeBuildInputs = [ cmake pkg-config ] @@ -285,8 +305,8 @@ let src = fetchFromGitHub { owner = "go-skynet"; repo = "go-bert.cpp"; - rev = "6abe312cded14042f6b7c3cd8edf082713334a4d"; - hash = "sha256-lh9cvXc032Eq31kysxFOkRd0zPjsCznRl0tzg9P2ygo="; + rev = "710044b124545415f555e4260d16b146c725a6e4"; + hash = "sha256-UNrs3unYjvSzCVaVISFFBDD+s37lmN6/7ajmGNcYgrU="; fetchSubmodules = true; }; buildFlags = [ "libgobert.a" ]; @@ -372,18 +392,18 @@ let stdenv; pname = "local-ai"; - version = "2.15.0"; + version = "2.16.0"; src = fetchFromGitHub { owner = "go-skynet"; repo = "LocalAI"; rev = "v${version}"; - hash = "sha256-AjNgfZjVxlw0LtPbUTbJuLcUfqJdPzn6vOmUDz/v7Jc="; + hash = "sha256-3SfU68wGyYIX0haKfuHGKHhthuDSeSdr18ReDkFzhH0="; }; self = buildGoModule.override { stdenv = effectiveStdenv; } { inherit pname version src; - vendorHash = "sha256-+ZPZkOpaTsKrL2HDOEtAr8sT6uqTiQXo/XS+MBNZq5E="; + vendorHash = "sha256-UjqEsgRZ+xv4Thwh4u3juvg3JI3+RdGyCZlsk7ddgTU="; env.NIX_CFLAGS_COMPILE = lib.optionalString with_stablediffusion " -isystem ${opencv}/include/opencv4"; @@ -403,12 +423,20 @@ let -e 's;git clone.*go-tiny-dream$;${cp} ${if with_tinydream then go-tiny-dream else go-tiny-dream.src} sources/go-tiny-dream;' \ -e 's, && git checkout.*,,g' \ -e '/mod download/ d' \ - -e '/^ALL_GRPC_BACKENDS+=backend-assets\/grpc\/llama-cpp-/ d' \ + -e '/^ALL_GRPC_BACKENDS+=backend-assets\/grpc\/llama-cpp-fallback/ d' \ + -e '/^ALL_GRPC_BACKENDS+=backend-assets\/grpc\/llama-cpp-avx/ d' \ + -e '/^ALL_GRPC_BACKENDS+=backend-assets\/grpc\/llama-cpp-cuda/ d' \ + ''; postConfigure = '' + shopt -s extglob mkdir -p backend-assets/grpc - cp ${llama-cpp-grpc}/bin/*grpc-server backend-assets/grpc/llama-cpp + cp ${llama-cpp-grpc}/bin/?(llama-cpp-)grpc-server backend-assets/grpc/llama-cpp-avx2 + cp ${llama-cpp-rpc}/bin/?(llama-cpp-)grpc-server backend-assets/grpc/llama-cpp-grpc + + mkdir -p backend-assets/util + cp ${llama-cpp-rpc}/bin/?(llama-cpp-)rpc-server backend-assets/util/llama-cpp-rpc-server ''; buildInputs = [ ] @@ -496,7 +524,7 @@ let inherit go-tiny-dream go-rwkv go-bert go-llama gpt4all go-piper llama-cpp-grpc whisper-cpp go-tiny-dream-ncnn espeak-ng' piper-phonemize - piper-tts'; + piper-tts' llama-cpp-rpc; }; passthru.features = { From 17c2d29811ab7372e721a3ea47c49d17dcbbbb79 Mon Sep 17 00:00:00 2001 From: Diogo Date: Sat, 15 Jun 2024 21:30:51 +0000 Subject: [PATCH 23/26] maintainers: rename astindev to diogomdp --- maintainers/maintainer-list.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 58679702e21d..ea3b244cdee1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1917,12 +1917,6 @@ githubId = 7745457; name = "Astavie"; }; - astindev = { - email = "astindev@pm.me"; - github = "astindev"; - githubId = 52360869; - name = "Astin"; - }; astro = { email = "astro@spaceboyz.net"; github = "astro"; @@ -5234,6 +5228,12 @@ github = "diniamo"; githubId = 55629891; }; + diogomdp = { + email = "me@diogodp.dev"; + github = "diogomdp"; + githubId = 52360869; + name = "Diogo"; + }; diogotcorreia = { name = "Diogo Correia"; email = "me@diogotc.com"; From 9a2ff70471b9b566c2912d4997dacd3206306ed7 Mon Sep 17 00:00:00 2001 From: Joshua Manchester Date: Sat, 15 Jun 2024 22:20:01 +0100 Subject: [PATCH 24/26] home-assistant-custom-components.adaptive_lighting: 1.19.1 -> 1.22.0 https://github.com/basnijholt/adaptive-lighting/releases/tag/1.20.0 https://github.com/basnijholt/adaptive-lighting/releases/tag/1.21.0 https://github.com/basnijholt/adaptive-lighting/releases/tag/1.21.1 https://github.com/basnijholt/adaptive-lighting/releases/tag/1.21.2 https://github.com/basnijholt/adaptive-lighting/releases/tag/1.21.3 https://github.com/basnijholt/adaptive-lighting/releases/tag/1.22.0 --- .../custom-components/adaptive_lighting/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/home-assistant/custom-components/adaptive_lighting/default.nix b/pkgs/servers/home-assistant/custom-components/adaptive_lighting/default.nix index 1d2ae2228a5b..9c35395d3e98 100644 --- a/pkgs/servers/home-assistant/custom-components/adaptive_lighting/default.nix +++ b/pkgs/servers/home-assistant/custom-components/adaptive_lighting/default.nix @@ -7,13 +7,13 @@ buildHomeAssistantComponent rec { owner = "basnijholt"; domain = "adaptive_lighting"; - version = "1.19.1"; + version = "1.22.0"; src = fetchFromGitHub { owner = "basnijholt"; repo = "adaptive-lighting"; rev = "refs/tags/${version}"; - hash = "sha256-AZsloE1vNQ9o2pg878J6I5qYXyI4fqYEvr18SrTocWo="; + hash = "sha256-k5pCgPM5xjVfWjOcr0UDFzYl/8z7yUwgYdBmC3+2F5k="; }; propagatedBuildInputs = [ From d2eb2b4cb09e36a66ff58bb1f6088370442b45f2 Mon Sep 17 00:00:00 2001 From: Diogo Date: Sat, 15 Jun 2024 21:35:46 +0000 Subject: [PATCH 25/26] vscode-extensions.discloud.discloud: update renamed astindev --- pkgs/applications/editors/vscode/extensions/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 2a36d7897879..1d3670702773 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -1291,7 +1291,7 @@ let downloadPage = "https://marketplace.visualstudio.com/items?itemName=discloud.discloud"; homepage = "https://github.com/discloud/vscode-discloud"; license = lib.licenses.asl20; - maintainers = [ lib.maintainers.astindev ]; + maintainers = [ lib.maintainers.diogomdp ]; }; }; From c3a453e548a0cd8ce3f5481f53774bd7abd15021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Sun, 16 Jun 2024 08:15:43 +1000 Subject: [PATCH 26/26] bftpd: fix darwin build Explicitly set the C standard to fix builds on new compilers. --- pkgs/servers/ftp/bftpd/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/servers/ftp/bftpd/default.nix b/pkgs/servers/ftp/bftpd/default.nix index b7ad77e5e75a..0aba1e90a164 100644 --- a/pkgs/servers/ftp/bftpd/default.nix +++ b/pkgs/servers/ftp/bftpd/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { buildInputs = [ libxcrypt ]; + CFLAGS = "-std=gnu89"; + preConfigure = '' sed -re 's/-[og] 0//g' -i Makefile* '';