From 7ae5b2fbbcb47f8fd912fac45c7ece438d3e3563 Mon Sep 17 00:00:00 2001 From: voidarc Date: Mon, 29 Jun 2026 13:37:12 +0100 Subject: [PATCH] ignored .devenv --- .devenv/bash-bash | 1 - .devenv/bootstrap/bootstrapLib.nix | 603 ---- .devenv/bootstrap/default.nix | 19 - .devenv/bootstrap/resolve-lock.nix | 157 -- .devenv/gc/shell | 1 - .../gc/task-config-devenv-config-task-config | 1 - .devenv/imports.txt | 0 .devenv/input-paths.txt | 9 - .devenv/load-exports | 1 - .devenv/nixpkgs-config-f0bff968555a3434.nix | 12 - .devenv/profile | 1 - .devenv/run | 1 - .devenv/shell-20cef00395041120.sh | 2258 --------------- .devenv/shell-2b51e7588d77ce70.sh | 2258 --------------- .devenv/shell-3503282b7604ae54.sh | 2258 --------------- .devenv/shell-3ccc9ebdaaad8b3f.sh | 2258 --------------- .devenv/shell-3f79910ee86ced32.sh | 2265 --------------- .devenv/shell-4a9089e6e3ce3083.sh | 2258 --------------- .devenv/shell-50ea0b87d2caf049.sh | 2258 --------------- .devenv/shell-7f08e6d76227994d.sh | 2265 --------------- .devenv/shell-93a57e7732b1fa8a.sh | 2265 --------------- .devenv/shell-9b7949b96e5561ee.sh | 2258 --------------- .devenv/shell-ad083a082e46f0e9.sh | 2258 --------------- .devenv/shell-bc17db56c7f8a19a.sh | 2258 --------------- .devenv/shell-d2d0e9bf7bb10942.sh | 2258 --------------- .devenv/shell-deca24b8fe0d1abe.sh | 2258 --------------- .devenv/shell-e893b9157f2d2e31.sh | 2265 --------------- .devenv/shell-e8cdd2fa2b8a2526.sh | 2258 --------------- .devenv/shell-env.sh | 2250 --------------- .devenv/shell-rcfile.sh | 163 -- .devenv/state/files.json | 1 - .devenv/task-names.txt | 6 - .devenv/zsh/.zcompdump | 2464 ---------------- .devenv/zsh/.zcompdump-HACKSTATION-5.9.1 | 2467 ----------------- .devenv/zsh/.zcompdump-HACKSTATION-5.9.1.zwc | Bin 131144 -> 0 bytes .devenv/zsh/.zshenv | 6 - .devenv/zsh/.zshrc | 200 -- .gitignore | 1 + 38 files changed, 1 insertion(+), 44519 deletions(-) delete mode 120000 .devenv/bash-bash delete mode 100644 .devenv/bootstrap/bootstrapLib.nix delete mode 100644 .devenv/bootstrap/default.nix delete mode 100644 .devenv/bootstrap/resolve-lock.nix delete mode 120000 .devenv/gc/shell delete mode 120000 .devenv/gc/task-config-devenv-config-task-config delete mode 100644 .devenv/imports.txt delete mode 100644 .devenv/input-paths.txt delete mode 100755 .devenv/load-exports delete mode 100644 .devenv/nixpkgs-config-f0bff968555a3434.nix delete mode 120000 .devenv/profile delete mode 120000 .devenv/run delete mode 100755 .devenv/shell-20cef00395041120.sh delete mode 100755 .devenv/shell-2b51e7588d77ce70.sh delete mode 100755 .devenv/shell-3503282b7604ae54.sh delete mode 100755 .devenv/shell-3ccc9ebdaaad8b3f.sh delete mode 100755 .devenv/shell-3f79910ee86ced32.sh delete mode 100755 .devenv/shell-4a9089e6e3ce3083.sh delete mode 100755 .devenv/shell-50ea0b87d2caf049.sh delete mode 100755 .devenv/shell-7f08e6d76227994d.sh delete mode 100755 .devenv/shell-93a57e7732b1fa8a.sh delete mode 100755 .devenv/shell-9b7949b96e5561ee.sh delete mode 100755 .devenv/shell-ad083a082e46f0e9.sh delete mode 100755 .devenv/shell-bc17db56c7f8a19a.sh delete mode 100755 .devenv/shell-d2d0e9bf7bb10942.sh delete mode 100755 .devenv/shell-deca24b8fe0d1abe.sh delete mode 100755 .devenv/shell-e893b9157f2d2e31.sh delete mode 100755 .devenv/shell-e8cdd2fa2b8a2526.sh delete mode 100644 .devenv/shell-env.sh delete mode 100644 .devenv/shell-rcfile.sh delete mode 100644 .devenv/state/files.json delete mode 100644 .devenv/task-names.txt delete mode 100644 .devenv/zsh/.zcompdump delete mode 100644 .devenv/zsh/.zcompdump-HACKSTATION-5.9.1 delete mode 100644 .devenv/zsh/.zcompdump-HACKSTATION-5.9.1.zwc delete mode 100644 .devenv/zsh/.zshenv delete mode 100644 .devenv/zsh/.zshrc diff --git a/.devenv/bash-bash b/.devenv/bash-bash deleted file mode 120000 index 4574808..0000000 --- a/.devenv/bash-bash +++ /dev/null @@ -1 +0,0 @@ -/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9 \ No newline at end of file diff --git a/.devenv/bootstrap/bootstrapLib.nix b/.devenv/bootstrap/bootstrapLib.nix deleted file mode 100644 index 8f41ce4..0000000 --- a/.devenv/bootstrap/bootstrapLib.nix +++ /dev/null @@ -1,603 +0,0 @@ -# Shared library functions for devenv evaluation -{ inputs }: - -rec { - # Helper to get overlays for a given input - getOverlays = - inputName: inputAttrs: - let - lib = inputs.nixpkgs.lib; - in - map - ( - overlay: - let - input = - inputs.${inputName} or (throw "No such input `${inputName}` while trying to configure overlays."); - in - input.overlays.${overlay} - or (throw "Input `${inputName}` has no overlay called `${overlay}`. Supported overlays: ${lib.concatStringsSep ", " (builtins.attrNames input.overlays)}") - ) inputAttrs.overlays or [ ]; - - # Main function to create devenv configuration for a specific system with profiles support - # This is the full-featured version used by default.nix - mkDevenvForSystem = - { version - , is_development_version ? false - , require_version_match ? false - , system - , devenv_root - , git_root ? null - , devenv_dotfile - , devenv_dotfile_path - , devenv_tmpdir - , devenv_runtime - , devenv_state ? null - , devenv_istesting ? false - , devenv_direnvrc_latest_version - , active_profiles ? [ ] - , hostname - , username - , cli_options ? [ ] - , skip_local_src ? false - , secretspec ? null - , devenv_inputs ? { } - , devenv_imports ? [ ] - , impure ? false - , nixpkgs_config ? { } - , lock_fingerprint ? null - , primops ? { } - }: - let - inherit (inputs) nixpkgs; - lib = nixpkgs.lib; - targetSystem = system; - - overlays = lib.flatten (lib.mapAttrsToList getOverlays devenv_inputs); - - # Helper to create pkgs for a given system with nixpkgs_config - mkPkgsForSystem = - evalSystem: - import nixpkgs { - system = evalSystem; - config = nixpkgs_config // { - # nixpkgs' check-meta.nix natively handles permittedInsecurePackages - # via allowInsecureDefaultPredicate using the full derivation name. - # We must NOT override allowInsecurePredicate here, as lib.getName - # strips the version, causing mismatches with user-provided entries - # like "openssl-1.1.1w". - # - # For unfree packages, nixpkgs does not natively support - # permittedUnfreePackages, so we provide a custom predicate. - allowUnfreePredicate = - if nixpkgs_config.allowUnfree or false then - (_: true) - else if (nixpkgs_config.permittedUnfreePackages or [ ]) != [ ] then - (pkg: builtins.elem (lib.getName pkg) (nixpkgs_config.permittedUnfreePackages or [ ])) - else - (_: false); - } // lib.optionalAttrs ((nixpkgs_config.allowlistedLicenses or [ ]) != [ ]) { - allowlistedLicenses = map (name: lib.licenses.${name}) (nixpkgs_config.allowlistedLicenses or [ ]); - } // lib.optionalAttrs ((nixpkgs_config.blocklistedLicenses or [ ]) != [ ]) { - blocklistedLicenses = map (name: lib.licenses.${name}) (nixpkgs_config.blocklistedLicenses or [ ]); - }; - inherit overlays; - }; - - pkgsBootstrap = mkPkgsForSystem targetSystem; - - # Helper to import a path, trying .nix first then /devenv.nix - # Returns a list of modules, including devenv.local.nix when present - tryImport = - resolvedPath: basePath: - if lib.hasSuffix ".nix" basePath then - [ (import resolvedPath) ] - else - let - devenvpath = resolvedPath + "/devenv.nix"; - localpath = resolvedPath + "/devenv.local.nix"; - in - if builtins.pathExists devenvpath then - [ (import devenvpath) ] ++ lib.optional (builtins.pathExists localpath) (import localpath) - else - throw (basePath + "/devenv.nix file does not exist"); - - importModule = - path: - if lib.hasPrefix "path:" path then - # path: prefix indicates a local filesystem path - strip it and import directly - let - actualPath = builtins.substring 5 999999 path; - in - tryImport (/. + actualPath) path - else if lib.hasPrefix "/" path then - # Absolute path - import directly (avoids input resolution and NAR hash computation) - tryImport (/. + path) path - else if lib.hasPrefix "./" path then - # Relative paths are relative to devenv_root, not bootstrap directory - let - relPath = builtins.substring 1 255 path; - in - tryImport (/. + devenv_root + relPath) path - else if lib.hasPrefix "../" path then - # Parent relative paths also relative to devenv_root - tryImport (/. + devenv_root + "/${path}") path - else - let - paths = lib.splitString "/" path; - name = builtins.head paths; - input = inputs.${name} or (throw "Unknown input ${name}"); - subpath = "/${lib.concatStringsSep "/" (builtins.tail paths)}"; - devenvpath = input + subpath; - in - tryImport devenvpath path; - - # Common modules shared between main evaluation and cross-system evaluation - mkCommonModules = - evalPkgs: - [ - ( - { config, ... }: - { - _module.args.pkgs = evalPkgs.appendOverlays (config.overlays or [ ]); - _module.args.secretspec = secretspec; - _module.args.devenvPrimops = primops; - } - ) - (inputs.devenv.modules + /top-level.nix) - ( - { options, ... }: - { - config.devenv = lib.mkMerge [ - { - root = devenv_root; - dotfile = devenv_dotfile; - } - ( - if builtins.hasAttr "cli" options.devenv then - { - cli.version = version; - cli.isDevelopment = is_development_version; - } - else - { - cliVersion = version; - } - ) - (lib.optionalAttrs - (builtins.hasAttr "cli" options.devenv - && builtins.hasAttr "requireVersionMatch" options.devenv.cli) - { - cli.requireVersionMatch = require_version_match; - } - ) - (lib.optionalAttrs (builtins.hasAttr "tmpdir" options.devenv) { - tmpdir = devenv_tmpdir; - }) - (lib.optionalAttrs (builtins.hasAttr "isTesting" options.devenv) { - isTesting = devenv_istesting; - }) - (lib.optionalAttrs (builtins.hasAttr "runtime" options.devenv) { - runtime = devenv_runtime; - }) - (lib.optionalAttrs (builtins.hasAttr "state" options.devenv && devenv_state != null) { - state = lib.mkForce devenv_state; - }) - (lib.optionalAttrs (builtins.hasAttr "direnvrcLatestVersion" options.devenv) { - direnvrcLatestVersion = devenv_direnvrc_latest_version; - }) - ]; - } - ) - ( - { options, ... }: - { - config = lib.mkMerge [ - (lib.optionalAttrs (builtins.hasAttr "git" options) { - git.root = git_root; - }) - ]; - } - ) - ] - ++ (lib.flatten (map importModule devenv_imports)) - ++ (if !skip_local_src then (importModule (devenv_root + "/devenv.nix")) else [ ]) - ++ [ - ( - let - localPath = devenv_root + "/devenv.local.nix"; - in - if builtins.pathExists localPath then import localPath else { } - ) - cli_options - ]; - - # Phase 1: Base evaluation to extract profile definitions - baseProject = lib.evalModules { - specialArgs = inputs // { - inherit inputs secretspec primops; - }; - modules = mkCommonModules pkgsBootstrap; - }; - - # Phase 2: Extract and apply profiles using extendModules with priority overrides - project = - let - # Build ordered list of profile names: hostname -> user -> manual - manualProfiles = active_profiles; - currentHostname = hostname; - currentUsername = username; - hostnameProfiles = lib.optional - ( - currentHostname != null - && currentHostname != "" - && builtins.hasAttr currentHostname (baseProject.config.profiles.hostname or { }) - ) "hostname.${currentHostname}"; - userProfiles = lib.optional - ( - currentUsername != null - && currentUsername != "" - && builtins.hasAttr currentUsername (baseProject.config.profiles.user or { }) - ) "user.${currentUsername}"; - - # Ordered list of profiles to activate - orderedProfiles = hostnameProfiles ++ userProfiles ++ manualProfiles; - - # Resolve profile extends with cycle detection - resolveProfileExtends = - profileName: visited: - if builtins.elem profileName visited then - throw "Circular dependency detected in profile extends: ${lib.concatStringsSep " -> " visited} -> ${profileName}" - else - let - profile = getProfileConfig profileName; - extends = profile.extends or [ ]; - newVisited = visited ++ [ profileName ]; - extendedProfiles = lib.flatten (map (name: resolveProfileExtends name newVisited) extends); - in - extendedProfiles ++ [ profileName ]; - - # Get profile configuration by name from baseProject - getProfileConfig = - profileName: - if lib.hasPrefix "hostname." profileName then - let - name = lib.removePrefix "hostname." profileName; - in - baseProject.config.profiles.hostname.${name} - else if lib.hasPrefix "user." profileName then - let - name = lib.removePrefix "user." profileName; - in - baseProject.config.profiles.user.${name} - else - let - availableProfiles = builtins.attrNames (baseProject.config.profiles or { }); - hostnameProfiles = map (n: "hostname.${n}") ( - builtins.attrNames (baseProject.config.profiles.hostname or { }) - ); - userProfiles = map (n: "user.${n}") (builtins.attrNames (baseProject.config.profiles.user or { })); - allAvailableProfiles = availableProfiles ++ hostnameProfiles ++ userProfiles; - in - baseProject.config.profiles.${profileName} - or (throw "Profile '${profileName}' not found. Available profiles: ${lib.concatStringsSep ", " allAvailableProfiles}"); - - # Fold over ordered profiles to build final list with extends - expandedProfiles = lib.foldl' - ( - acc: profileName: - let - allProfileNames = resolveProfileExtends profileName [ ]; - in - acc ++ allProfileNames - ) [ ] - orderedProfiles; - - # Map over expanded profiles and apply priorities - allPrioritizedModules = lib.imap0 - ( - index: profileName: - let - profilePriority = (lib.modules.defaultOverridePriority - 1) - index; - profileConfig = getProfileConfig profileName; - - typeNeedsOverride = - type: - if type == null then - false - else - let - typeName = type.name or type._type or ""; - - isLeafType = builtins.elem typeName [ - "str" - "int" - "bool" - "enum" - "path" - "package" - "float" - "anything" - ]; - in - if isLeafType then - true - else if typeName == "nullOr" then - let - innerType = - type.elemType - or (if type ? nestedTypes && type.nestedTypes ? elemType then type.nestedTypes.elemType else null); - in - if innerType != null then typeNeedsOverride innerType else false - else - false; - - pathNeedsOverride = - optionPath: - let - directOption = lib.attrByPath optionPath null baseProject.options; - in - if directOption != null && lib.isOption directOption then - typeNeedsOverride directOption.type - else if optionPath != [ ] then - let - parentPath = lib.init optionPath; - parentOption = lib.attrByPath parentPath null baseProject.options; - in - if parentOption != null && lib.isOption parentOption then - let - freeformType = parentOption.type.freeformType or parentOption.type.nestedTypes.freeformType or null; - elementType = - if freeformType ? elemType then - freeformType.elemType - else if freeformType ? nestedTypes && freeformType.nestedTypes ? elemType then - freeformType.nestedTypes.elemType - else - freeformType; - in - typeNeedsOverride elementType - else - false - else - false; - - applyModuleOverride = - config: - if builtins.isFunction config then - let - wrapper = args: applyOverrideRecursive (config args) [ ]; - in - lib.mirrorFunctionArgs config wrapper - else - applyOverrideRecursive config [ ]; - - applyOverrideRecursive = - config: optionPath: - if lib.isAttrs config && config ? _type then - config - else if lib.isAttrs config then - lib.mapAttrs (name: value: applyOverrideRecursive value (optionPath ++ [ name ])) config - else if pathNeedsOverride optionPath then - lib.mkOverride profilePriority config - else - config; - - prioritizedConfig = ( - profileConfig.module - // { - imports = lib.map - ( - importItem: - importItem - // { - imports = lib.map (nestedImport: applyModuleOverride nestedImport) (importItem.imports or [ ]); - } - ) - (profileConfig.module.imports or [ ]); - } - ); - in - prioritizedConfig - ) - expandedProfiles; - in - if allPrioritizedModules == [ ] then - baseProject - else - baseProject.extendModules { modules = allPrioritizedModules; }; - - config = project.config; - - # Per-container scoped re-evaluation that flips `isBuilding` for the - # container being built. Selecting one container cannot pollute the - # evaluation of any other operation, since each `containerBuilds.` - # is its own `extendModules` scope. - mkContainerBuilds = - evalProject: - lib.genAttrs (lib.attrNames evalProject.config.containers) ( - name: - let - scoped = evalProject.extendModules { - modules = [{ - container.isBuilding = lib.mkForce true; - containers.${name}.isBuilding = lib.mkForce true; - }]; - }; - in - scoped.config.containers.${name} - ); - - containerBuilds = mkContainerBuilds project; - - # Apply config overlays to pkgs - pkgs = pkgsBootstrap.appendOverlays (config.overlays or [ ]); - - options = pkgs.nixosOptionsDoc { - options = builtins.removeAttrs project.options [ "_module" ]; - warningsAreErrors = false; - transformOptions = - let - isDocType = - v: - builtins.elem v [ - "literalDocBook" - "literalExpression" - "literalMD" - "mdDoc" - ]; - in - lib.attrsets.mapAttrs ( - _: v: - if v ? _type && isDocType v._type then - v.text - else if v ? _type && v._type == "derivation" then - v.name - else - v - ); - }; - - build = - options: config: - lib.concatMapAttrs - ( - name: option: - if lib.isOption option then - let - typeName = option.type.name or ""; - in - if - builtins.elem typeName [ - "output" - "outputOf" - ] - then - { - ${name} = config.${name}; - } - else - { } - else if builtins.isAttrs option && !lib.isDerivation option then - let - v = build option config.${name}; - in - if v != { } then { ${name} = v; } else { } - else - { } - ) - options; - - # Helper to evaluate devenv for a specific system (for cross-compilation, e.g. macOS building Linux containers) - evalForSystem = - evalSystem: - let - evalPkgs = mkPkgsForSystem evalSystem; - evalProject = lib.evalModules { - specialArgs = inputs // { - inherit inputs secretspec primops; - }; - modules = mkCommonModules evalPkgs; - }; - in - { - config = evalProject.config; - containerBuilds = mkContainerBuilds evalProject; - }; - - # All supported systems for cross-compilation (lazily evaluated) - allSystems = [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; - - # Generate perSystem entries for all systems (only evaluated when accessed) - perSystemConfigs = lib.genAttrs allSystems ( - perSystem: - if perSystem == targetSystem then - { inherit config containerBuilds; } - else - evalForSystem perSystem - ); - in - { - inherit - pkgs - config - options - project - ; - bash = pkgs.bash; - shell = config.shell; - optionsJSON = options.optionsJSON; - info = config.info; - ci = config.ciDerivation; - build = build project.options config; - devenv = { - # Backwards compatibility: wrap config in devenv attribute for code expecting devenv.config.* - inherit config containerBuilds; - # perSystem structure for cross-compilation (e.g. macOS building Linux containers) - perSystem = perSystemConfigs; - }; - }; - - # Simplified devenv evaluation for inputs - # This is a lightweight version suitable for evaluating an input's devenv.nix - mkDevenvForInput = - { - # The input to evaluate (must have outPath and sourceInfo) - input - , # All resolved inputs (for specialArgs) - allInputs - , # System to evaluate for - system ? builtins.currentSystem - , # Nixpkgs to use (defaults to allInputs.nixpkgs) - nixpkgs ? allInputs.nixpkgs or (throw "nixpkgs input required") - , # Devenv modules (defaults to allInputs.devenv) - devenv ? allInputs.devenv or (throw "devenv input required") - , - }: - let - devenvPath = input.outPath + "/devenv.nix"; - hasDevenv = builtins.pathExists devenvPath; - in - if !hasDevenv then - throw '' - Input does not have a devenv.nix file. - Expected file at: ${devenvPath} - - To use this input's devenv configuration, the input must provide a devenv.nix file. - '' - else - let - pkgs = import nixpkgs { - inherit system; - config = { }; - }; - lib = pkgs.lib; - - project = lib.evalModules { - specialArgs = allInputs // { - inputs = allInputs; - secretspec = null; - }; - modules = [ - ( - { config, ... }: - { - _module.args.pkgs = pkgs.appendOverlays (config.overlays or [ ]); - } - ) - (devenv.outPath + "/src/modules/top-level.nix") - (import devenvPath) - ]; - }; - in - { - inherit pkgs; - config = project.config; - options = project.options; - inherit project; - }; -} diff --git a/.devenv/bootstrap/default.nix b/.devenv/bootstrap/default.nix deleted file mode 100644 index 7010be3..0000000 --- a/.devenv/bootstrap/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -args@{ system -, # The project root (location of devenv.nix) - devenv_root -, ... -}: - -let - inherit - (import ./resolve-lock.nix { - src = devenv_root; - inherit system; - }) - inputs - ; - - bootstrapLib = import ./bootstrapLib.nix { inherit inputs; }; -in - -bootstrapLib.mkDevenvForSystem args diff --git a/.devenv/bootstrap/resolve-lock.nix b/.devenv/bootstrap/resolve-lock.nix deleted file mode 100644 index fee5ebc..0000000 --- a/.devenv/bootstrap/resolve-lock.nix +++ /dev/null @@ -1,157 +0,0 @@ -# Adapted from https://git.lix.systems/lix-project/flake-compat/src/branch/main/default.nix -{ src -, system ? builtins.currentSystem or "unknown-system" -, -}: - -let - lockFilePath = src + "/devenv.lock"; - - lockFile = builtins.fromJSON (builtins.readFile lockFilePath); - - rootSrc = { - lastModified = 0; - lastModifiedDate = formatSecondsSinceEpoch 0; - # *hacker voice*: it's definitely a store path, I promise (actually a - # nixlang path value, likely not pointing at the store). - outPath = src; - }; - - # Format number of seconds in the Unix epoch as %Y%m%d%H%M%S. - formatSecondsSinceEpoch = - t: - let - rem = x: y: x - x / y * y; - days = t / 86400; - secondsInDay = rem t 86400; - hours = secondsInDay / 3600; - minutes = (rem secondsInDay 3600) / 60; - seconds = rem t 60; - - # Courtesy of https://stackoverflow.com/a/32158604. - z = days + 719468; - era = (if z >= 0 then z else z - 146096) / 146097; - doe = z - era * 146097; - yoe = (doe - doe / 1460 + doe / 36524 - doe / 146096) / 365; - y = yoe + era * 400; - doy = doe - (365 * yoe + yoe / 4 - yoe / 100); - mp = (5 * doy + 2) / 153; - d = doy - (153 * mp + 2) / 5 + 1; - m = mp + (if mp < 10 then 3 else -9); - y' = y + (if m <= 2 then 1 else 0); - - pad = s: if builtins.stringLength s < 2 then "0" + s else s; - in - "${toString y'}${pad (toString m)}${pad (toString d)}${pad (toString hours)}${pad (toString minutes)}${pad (toString seconds)}"; - - allNodes = builtins.mapAttrs - ( - key: node: - let - sourceInfo = - if key == lockFile.root then - rootSrc - # Path inputs pointing to project root (path = ".") should use rootSrc - # to avoid fetchTree hashing the entire project directory - else if node.locked.type or null == "path" && node.locked.path or null == "." then - rootSrc - else - let - locked = node.locked; - isRelativePath = p: p != null && (builtins.substring 0 2 p == "./" || builtins.substring 0 3 p == "../"); - # Resolve relative paths against src - resolvedLocked = locked - // (if locked.type or null == "path" && isRelativePath (locked.path or null) - then { path = toString src + "/${locked.path}"; } - else { }) - // (if locked.type or null == "git" && isRelativePath (locked.url or null) - then { url = toString src + "/${locked.url}"; } - else { }); - in - builtins.fetchTree (node.info or { } // removeAttrs resolvedLocked [ "dir" ]); - - subdir = if key == lockFile.root then "" else node.locked.dir or ""; - - outPath = sourceInfo + ((if subdir == "" then "" else "/") + subdir); - - # Resolve a input spec into a node name. An input spec is - # either a node name, or a 'follows' path from the root - # node. - resolveInput = - inputSpec: if builtins.isList inputSpec then getInputByPath lockFile.root inputSpec else inputSpec; - - # Follow an input path (e.g. ["dwarffs" "nixpkgs"]) from the - # root node, returning the final node. - getInputByPath = - nodeName: path: - if path == [ ] then - nodeName - else - getInputByPath - # Since this could be a 'follows' input, call resolveInput. - (resolveInput lockFile.nodes.${nodeName}.inputs.${builtins.head path}) - (builtins.tail path); - - inputs = builtins.mapAttrs (inputName: inputSpec: allNodes.${resolveInput inputSpec}) ( - node.inputs or { } - ); - - # Only import flake.nix for non-root nodes (root doesn't need it) - flake = if key == lockFile.root then null else import (outPath + "/flake.nix"); - - outputs = if key == lockFile.root then { } else flake.outputs (inputs // { self = result; }); - - # Lazy devenv evaluation for this input - devenvEval = - let - bootstrapLib = import ./bootstrapLib.nix { inputs = inputs; }; - in - bootstrapLib.mkDevenvForInput { - input = { inherit outPath sourceInfo; }; - allInputs = inputs; - inherit system; - }; - - result = - outputs - // sourceInfo - // { - inherit outPath; - inherit inputs; - inherit outputs; - inherit sourceInfo; - _type = "flake"; - devenv = devenvEval; - }; - - nonFlakeResult = sourceInfo // { - inherit outPath; - inherit inputs; - inherit sourceInfo; - _type = "flake"; - devenv = devenvEval; - }; - - in - if node.flake or true && key != lockFile.root then - assert builtins.isFunction flake.outputs; - result - else - nonFlakeResult - ) - lockFile.nodes; - - result = - if !(builtins.pathExists lockFilePath) then - throw "${lockFilePath} does not exist" - else if lockFile.version >= 5 && lockFile.version <= 7 then - allNodes.${lockFile.root} - else - throw "lock file '${lockFilePath}' has unsupported version ${toString lockFile.version}"; - -in -{ - inputs = result.inputs or { } // { - self = result; - }; -} diff --git a/.devenv/gc/shell b/.devenv/gc/shell deleted file mode 120000 index b616743..0000000 --- a/.devenv/gc/shell +++ /dev/null @@ -1 +0,0 @@ -/nix/store/9dswnx96sj7qpqvah77lx8g25hsl1z1x-devenv-shell \ No newline at end of file diff --git a/.devenv/gc/task-config-devenv-config-task-config b/.devenv/gc/task-config-devenv-config-task-config deleted file mode 120000 index ed611cf..0000000 --- a/.devenv/gc/task-config-devenv-config-task-config +++ /dev/null @@ -1 +0,0 @@ -/nix/store/gj888l55lxj0brzhkjrdcald7zw7pskj-tasks.json \ No newline at end of file diff --git a/.devenv/imports.txt b/.devenv/imports.txt deleted file mode 100644 index e69de29..0000000 diff --git a/.devenv/input-paths.txt b/.devenv/input-paths.txt deleted file mode 100644 index 4be108d..0000000 --- a/.devenv/input-paths.txt +++ /dev/null @@ -1,9 +0,0 @@ -/home/user01/Projects/score-system/.devenv/bootstrap/bootstrapLib.nix -/home/user01/Projects/score-system/.devenv/bootstrap/default.nix -/home/user01/Projects/score-system/.devenv/bootstrap/resolve-lock.nix -/home/user01/Projects/score-system/devenv.local.nix -/home/user01/Projects/score-system/devenv.lock -/home/user01/Projects/score-system/devenv.nix -/home/user01/Projects/score-system/devenv.yaml -/home/user01/.config/nixpkgs/overlays -/home/user01/.config/nixpkgs/overlays.nix \ No newline at end of file diff --git a/.devenv/load-exports b/.devenv/load-exports deleted file mode 100755 index 8b13789..0000000 --- a/.devenv/load-exports +++ /dev/null @@ -1 +0,0 @@ - diff --git a/.devenv/nixpkgs-config-f0bff968555a3434.nix b/.devenv/nixpkgs-config-f0bff968555a3434.nix deleted file mode 100644 index 2679bf5..0000000 --- a/.devenv/nixpkgs-config-f0bff968555a3434.nix +++ /dev/null @@ -1,12 +0,0 @@ -let - cfg = {}; - getName = pkg: (builtins.parseDrvName (pkg.name or pkg.pname or "")).name; -in cfg // { - allowUnfreePredicate = - if cfg.allowUnfree or false then - (_: true) - else if (cfg.permittedUnfreePackages or []) != [] then - (pkg: builtins.elem (getName pkg) (cfg.permittedUnfreePackages or [])) - else - (_: false); -} \ No newline at end of file diff --git a/.devenv/profile b/.devenv/profile deleted file mode 120000 index 60e4f66..0000000 --- a/.devenv/profile +++ /dev/null @@ -1 +0,0 @@ -/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile \ No newline at end of file diff --git a/.devenv/run b/.devenv/run deleted file mode 120000 index 17467a6..0000000 --- a/.devenv/run +++ /dev/null @@ -1 +0,0 @@ -/run/user/1000/devenv-3f21a4e \ No newline at end of file diff --git a/.devenv/shell-20cef00395041120.sh b/.devenv/shell-20cef00395041120.sh deleted file mode 100755 index f2b9990..0000000 --- a/.devenv/shell-20cef00395041120.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -PKG_CONFIG='pkg-config' -export PKG_CONFIG -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -buildInputs='' -export buildInputs -outputDoc='out' -LD='ld' -export LD -NIX_LDFLAGS='-rpath /nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env/lib ' -export NIX_LDFLAGS -declare -a envBuildHostHooks=() -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -READELF='readelf' -export READELF -declare -a pkgsTargetTarget=() -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -declare -a pkgsBuildTarget=() -RANLIB='ranlib' -export RANLIB -depsTargetTarget='' -export depsTargetTarget -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -OBJCOPY='objcopy' -export OBJCOPY -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -cmakeFlags='' -export cmakeFlags -propagatedBuildInputs='' -export propagatedBuildInputs -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -STRINGS='strings' -export STRINGS -OPTERR='1' -outputDevdoc='REMOVE' -declare -a envTargetTargetHooks=() -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -preferLocalBuild='1' -export preferLocalBuild -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -patches='' -export patches -HOSTTYPE='x86_64' -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -_substituteStream_has_warned_replace_deprecation='false' -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -depsHostHost='' -export depsHostHost -declare -a pkgsHostHost=() -AR='ar' -export AR -DEVENV_TASK_FILE='/nix/store/vsp3fis0yyfrw5zdw1r908cz5wkwy1qs-tasks.json' -export DEVENV_TASK_FILE -declare -a unpackCmdHooks=('_defaultUnpack' ) -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -PS4='+ ' -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -IFS=' -' -SIZE='size' -export SIZE -doInstallCheck='' -export doInstallCheck -outputMan='out' -depsBuildBuild='' -export depsBuildBuild -defaultBuildInputs='' -OSTYPE='linux-gnu' -MACHTYPE='x86_64-pc-linux-gnu' -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -outputs='out' -export outputs -phases='buildPhase' -export phases -declare -a preConfigureHooks=('_multioutConfig' ) -declare -a pkgsHostTarget=() -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -declare -a envBuildTargetHooks=() -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -outputBin='out' -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -system='x86_64-linux' -export system -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -CC='gcc' -export CC -DEVENV_TASKS='' -export DEVENV_TASKS -depsBuildTarget='' -export depsBuildTarget -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -doCheck='' -export doCheck -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -prefix='/nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env' -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -CXX='g++' -export CXX -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -LINENO='79' -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -outputLib='out' -strictDeps='' -export strictDeps -NIX_NO_SELF_RPATH='1' -OBJDUMP='objdump' -export OBJDUMP -outputInclude='out' -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -mesonFlags='' -export mesonFlags -outputDev='out' -AS='as' -export AS -STRIP='strip' -export STRIP -hardeningDisable='' -export hardeningDisable -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -out='/nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env' -export out -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -NM='nm' -export NM -declare -a envBuildBuildHooks=() -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -outputInfo='out' -declare -a pkgsBuildBuild=() -depsHostHostPropagated='' -export depsHostHostPropagated -outputDevman='out' -configureFlags='' -export configureFlags -OLDPWD='' -export OLDPWD -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -NIX_STORE='/nix/store' -export NIX_STORE -__structuredAttrs='' -export __structuredAttrs -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -NIX_CFLAGS_COMPILE=' -frandom-seed=yg7s9k8slf -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -name='devenv-shell-env' -export name -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -getTargetRole () -{ - - getRole "$targetOffset" -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -getHostRole () -{ - - getRole "$hostOffset" -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/devenv-enva5SBEb/script \ No newline at end of file diff --git a/.devenv/shell-2b51e7588d77ce70.sh b/.devenv/shell-2b51e7588d77ce70.sh deleted file mode 100755 index 3f0abb1..0000000 --- a/.devenv/shell-2b51e7588d77ce70.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -OPTERR='1' -PKG_CONFIG='pkg-config' -export PKG_CONFIG -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -patches='' -export patches -outputDevman='out' -declare -a pkgsTargetTarget=() -RANLIB='ranlib' -export RANLIB -_substituteStream_has_warned_replace_deprecation='false' -outputInfo='out' -LD='ld' -export LD -configureFlags='' -export configureFlags -NM='nm' -export NM -declare -a preConfigureHooks=('_multioutConfig' ) -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -NIX_LDFLAGS='-rpath /nix/store/qyvdk0h2xf5ynj2xn5lvml95m7cwyydb-devenv-shell-env/lib ' -export NIX_LDFLAGS -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -__structuredAttrs='' -export __structuredAttrs -outputBin='out' -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -declare -a unpackCmdHooks=('_defaultUnpack' ) -PS4='+ ' -depsHostHostPropagated='' -export depsHostHostPropagated -STRINGS='strings' -export STRINGS -declare -a pkgsHostHost=() -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -declare -a pkgsBuildBuild=() -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -propagatedBuildInputs='' -export propagatedBuildInputs -out='/nix/store/qyvdk0h2xf5ynj2xn5lvml95m7cwyydb-devenv-shell-env' -export out -system='x86_64-linux' -export system -STRIP='strip' -export STRIP -MACHTYPE='x86_64-pc-linux-gnu' -AR='ar' -export AR -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -OSTYPE='linux-gnu' -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -outputs='out' -export outputs -doCheck='' -export doCheck -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -outputLib='out' -DEVENV_TASKS='' -export DEVENV_TASKS -depsHostHost='' -export depsHostHost -hardeningDisable='' -export hardeningDisable -preferLocalBuild='1' -export preferLocalBuild -SIZE='size' -export SIZE -outputDev='out' -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -doInstallCheck='' -export doInstallCheck -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -depsTargetTarget='' -export depsTargetTarget -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -declare -a envBuildHostHooks=() -cmakeFlags='' -export cmakeFlags -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -declare -a envBuildBuildHooks=() -NIX_NO_SELF_RPATH='1' -IFS=' -' -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -declare -a envTargetTargetHooks=() -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -CC='gcc' -export CC -buildInputs='' -export buildInputs -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -OBJDUMP='objdump' -export OBJDUMP -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -declare -a pkgsHostTarget=() -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -NIX_CFLAGS_COMPILE=' -frandom-seed=qyvdk0h2xf -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -declare -a pkgsBuildTarget=() -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -defaultBuildInputs='' -depsBuildTarget='' -export depsBuildTarget -outputDevdoc='REMOVE' -strictDeps='' -export strictDeps -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -OLDPWD='' -export OLDPWD -depsBuildBuild='' -export depsBuildBuild -LINENO='79' -outputInclude='out' -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -name='devenv-shell-env' -export name -outputDoc='out' -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -READELF='readelf' -export READELF -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -OBJCOPY='objcopy' -export OBJCOPY -declare -a envBuildTargetHooks=() -mesonFlags='' -export mesonFlags -HOSTTYPE='x86_64' -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -DEVENV_TASK_FILE='/nix/store/b2d7b32aqvalmd56ajdh1cvyk0bmgldz-tasks.json' -export DEVENV_TASK_FILE -AS='as' -export AS -prefix='/nix/store/qyvdk0h2xf5ynj2xn5lvml95m7cwyydb-devenv-shell-env' -phases='buildPhase' -export phases -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -outputMan='out' -NIX_STORE='/nix/store' -export NIX_STORE -CXX='g++' -export CXX -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -getHostRole () -{ - - getRole "$hostOffset" -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -getTargetRole () -{ - - getRole "$targetOffset" -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/devenv-envhW5gfQ/script \ No newline at end of file diff --git a/.devenv/shell-3503282b7604ae54.sh b/.devenv/shell-3503282b7604ae54.sh deleted file mode 100755 index 795c66a..0000000 --- a/.devenv/shell-3503282b7604ae54.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -RANLIB='ranlib' -export RANLIB -STRINGS='strings' -export STRINGS -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -NM='nm' -export NM -CXX='g++' -export CXX -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -declare -a envBuildBuildHooks=() -hardeningDisable='' -export hardeningDisable -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -declare -a unpackCmdHooks=('_defaultUnpack' ) -OPTERR='1' -OLDPWD='' -export OLDPWD -system='x86_64-linux' -export system -out='/nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env' -export out -depsBuildBuild='' -export depsBuildBuild -CC='gcc' -export CC -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -doCheck='' -export doCheck -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -outputInclude='out' -declare -a pkgsHostTarget=() -declare -a pkgsBuildTarget=() -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -depsHostHostPropagated='' -export depsHostHostPropagated -declare -a envBuildHostHooks=() -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -PS4='+ ' -HOSTTYPE='x86_64' -outputDevdoc='REMOVE' -name='devenv-shell-env' -export name -declare -a preConfigureHooks=('_multioutConfig' ) -NIX_NO_SELF_RPATH='1' -OBJCOPY='objcopy' -export OBJCOPY -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -_substituteStream_has_warned_replace_deprecation='false' -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -outputDevman='out' -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -doInstallCheck='' -export doInstallCheck -propagatedBuildInputs='' -export propagatedBuildInputs -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -depsHostHost='' -export depsHostHost -prefix='/nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env' -declare -a pkgsTargetTarget=() -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -outputMan='out' -MACHTYPE='x86_64-pc-linux-gnu' -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -outputInfo='out' -outputs='out' -export outputs -AS='as' -export AS -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -NIX_CFLAGS_COMPILE=' -frandom-seed=yg7s9k8slf -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -LINENO='79' -defaultBuildInputs='' -AR='ar' -export AR -PKG_CONFIG='pkg-config' -export PKG_CONFIG -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -outputLib='out' -depsBuildTarget='' -export depsBuildTarget -declare -a pkgsBuildBuild=() -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -preferLocalBuild='1' -export preferLocalBuild -outputDoc='out' -NIX_STORE='/nix/store' -export NIX_STORE -declare -a envBuildTargetHooks=() -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -configureFlags='' -export configureFlags -SIZE='size' -export SIZE -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -STRIP='strip' -export STRIP -NIX_LDFLAGS='-rpath /nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env/lib ' -export NIX_LDFLAGS -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -outputBin='out' -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -READELF='readelf' -export READELF -patches='' -export patches -DEVENV_TASKS='' -export DEVENV_TASKS -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -cmakeFlags='' -export cmakeFlags -LD='ld' -export LD -mesonFlags='' -export mesonFlags -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -IFS=' -' -depsTargetTarget='' -export depsTargetTarget -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -buildInputs='' -export buildInputs -phases='buildPhase' -export phases -__structuredAttrs='' -export __structuredAttrs -DEVENV_TASK_FILE='/nix/store/vsp3fis0yyfrw5zdw1r908cz5wkwy1qs-tasks.json' -export DEVENV_TASK_FILE -OSTYPE='linux-gnu' -OBJDUMP='objdump' -export OBJDUMP -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -declare -a pkgsHostHost=() -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -declare -a envTargetTargetHooks=() -outputDev='out' -strictDeps='' -export strictDeps -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -getTargetRole () -{ - - getRole "$targetOffset" -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -getHostRole () -{ - - getRole "$hostOffset" -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/devenv-envCtHuwy/script \ No newline at end of file diff --git a/.devenv/shell-3ccc9ebdaaad8b3f.sh b/.devenv/shell-3ccc9ebdaaad8b3f.sh deleted file mode 100755 index a6f6e31..0000000 --- a/.devenv/shell-3ccc9ebdaaad8b3f.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -depsHostHostPropagated='' -export depsHostHostPropagated -propagatedBuildInputs='' -export propagatedBuildInputs -PS4='+ ' -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -outputMan='out' -LINENO='79' -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -outputLib='out' -declare -a preConfigureHooks=('_multioutConfig' ) -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -doCheck='' -export doCheck -prefix='/nix/store/g3n8670da0n1hrcg7bi4q0z55zln74yi-devenv-shell-env' -depsHostHost='' -export depsHostHost -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -declare -a pkgsBuildTarget=() -READELF='readelf' -export READELF -declare -a pkgsHostHost=() -OBJCOPY='objcopy' -export OBJCOPY -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp/nix-shell-28554-2490132097 - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -NIX_CFLAGS_COMPILE=' -frandom-seed=g3n8670da0 -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -outputInfo='out' -PKG_CONFIG='pkg-config' -export PKG_CONFIG -cmakeFlags='' -export cmakeFlags -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -OLDPWD='' -export OLDPWD -declare -a unpackCmdHooks=('_defaultUnpack' ) -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -NIX_STORE='/nix/store' -export NIX_STORE -mesonFlags='' -export mesonFlags -outputDevman='out' -HOSTTYPE='x86_64' -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -declare -a envBuildHostHooks=() -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -outputDoc='out' -OPTERR='1' -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -system='x86_64-linux' -export system -MACHTYPE='x86_64-pc-linux-gnu' -DEVENV_TASK_FILE='/nix/store/ba6jcphi2rcih5v4fp554w2l9m2hcylp-tasks.json' -export DEVENV_TASK_FILE -outputBin='out' -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -depsBuildTarget='' -export depsBuildTarget -declare -a pkgsBuildBuild=() -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -doInstallCheck='' -export doInstallCheck -hardeningDisable='' -export hardeningDisable -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -patches='' -export patches -depsTargetTarget='' -export depsTargetTarget -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -CC='gcc' -export CC -outputs='out' -export outputs -name='devenv-shell-env' -export name -buildInputs='' -export buildInputs -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -AS='as' -export AS -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -depsBuildBuild='' -export depsBuildBuild -declare -a envBuildTargetHooks=() -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -NIX_LDFLAGS='-rpath /nix/store/g3n8670da0n1hrcg7bi4q0z55zln74yi-devenv-shell-env/lib ' -export NIX_LDFLAGS -STRINGS='strings' -export STRINGS -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -declare -a pkgsTargetTarget=() -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -NM='nm' -export NM -DEVENV_TASKS='' -export DEVENV_TASKS -IFS=' -' -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -out='/nix/store/g3n8670da0n1hrcg7bi4q0z55zln74yi-devenv-shell-env' -export out -declare -a pkgsHostTarget=() -NIX_NO_SELF_RPATH='1' -SIZE='size' -export SIZE -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -CXX='g++' -export CXX -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -RANLIB='ranlib' -export RANLIB -LD='ld' -export LD -OSTYPE='linux-gnu' -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -AR='ar' -export AR -outputInclude='out' -phases='buildPhase' -export phases -defaultBuildInputs='' -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -preferLocalBuild='1' -export preferLocalBuild -strictDeps='' -export strictDeps -outputDevdoc='REMOVE' -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -declare -a envBuildBuildHooks=() -outputDev='out' -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -OBJDUMP='objdump' -export OBJDUMP -_substituteStream_has_warned_replace_deprecation='false' -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -STRIP='strip' -export STRIP -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -__structuredAttrs='' -export __structuredAttrs -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -configureFlags='' -export configureFlags -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a envTargetTargetHooks=() -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -getTargetRole () -{ - - getRole "$targetOffset" -} -getHostRole () -{ - - getRole "$hostOffset" -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/nix-shell-28554-2490132097/devenv-envBanSPu/script \ No newline at end of file diff --git a/.devenv/shell-3f79910ee86ced32.sh b/.devenv/shell-3f79910ee86ced32.sh deleted file mode 100755 index 56731c2..0000000 --- a/.devenv/shell-3f79910ee86ced32.sh +++ /dev/null @@ -1,2265 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -LINENO='79' -declare -a unpackCmdHooks=('_defaultUnpack' ) -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -name='devenv-shell-env' -export name -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -declare -a pkgsBuildTarget=() -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -PKG_CONFIG='pkg-config' -export PKG_CONFIG -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -IFS=' -' -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -propagatedBuildInputs='' -export propagatedBuildInputs -HOSTTYPE='x86_64' -NIX_CFLAGS_COMPILE=' -frandom-seed=y5k9a31603 -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -CC='gcc' -export CC -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -phases='buildPhase' -export phases -READELF='readelf' -export READELF -OSTYPE='linux-gnu' -RANLIB='ranlib' -export RANLIB -declare -a pkgsHostHost=() -outputInfo='out' -DEVENV_TASKS='' -export DEVENV_TASKS -depsBuildBuild='' -export depsBuildBuild -declare -a pkgsHostTarget=() -DEVENV_TASK_FILE='/nix/store/vsp3fis0yyfrw5zdw1r908cz5wkwy1qs-tasks.json' -export DEVENV_TASK_FILE -_substituteStream_has_warned_replace_deprecation='false' -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -OPTERR='1' -out='/nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env' -export out -strictDeps='' -export strictDeps -prefix='/nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env' -depsBuildTarget='' -export depsBuildTarget -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -outputBin='out' -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -patches='' -export patches -outputLib='out' -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -outputs='out' -export outputs -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -buildInputs='' -export buildInputs -depsTargetTarget='' -export depsTargetTarget -hardeningDisable='' -export hardeningDisable -outputDevman='out' -declare -a pkgsTargetTarget=() -NIX_LDFLAGS='-rpath /nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env/lib ' -export NIX_LDFLAGS -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -NM='nm' -export NM -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - -echo "💡 A dotenv file was found, while dotenv integration is currently not enabled." >&2 -echo >&2 -echo " To enable it, add \`dotenv.enable = true;\` to your devenv.nix file." >&2; -echo " To disable this hint, add \`dotenv.disableHint = true;\` to your devenv.nix file." >&2; -echo >&2 -echo "See https://devenv.sh/integrations/dotenv/ for more information." >&2; - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -OBJDUMP='objdump' -export OBJDUMP -defaultBuildInputs='' -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -declare -a envBuildHostHooks=() -declare -a preConfigureHooks=('_multioutConfig' ) -outputMan='out' -declare -a envTargetTargetHooks=() -declare -a pkgsBuildBuild=() -depsHostHostPropagated='' -export depsHostHostPropagated -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -configureFlags='' -export configureFlags -AS='as' -export AS -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -system='x86_64-linux' -export system -CXX='g++' -export CXX -doInstallCheck='' -export doInstallCheck -STRINGS='strings' -export STRINGS -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -MACHTYPE='x86_64-pc-linux-gnu' -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -LD='ld' -export LD -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -__structuredAttrs='' -export __structuredAttrs -OBJCOPY='objcopy' -export OBJCOPY -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -cmakeFlags='' -export cmakeFlags -PS4='+ ' -outputDev='out' -outputInclude='out' -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -OLDPWD='' -export OLDPWD -AR='ar' -export AR -outputDoc='out' -declare -a envBuildTargetHooks=() -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -depsHostHost='' -export depsHostHost -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -outputDevdoc='REMOVE' -NIX_STORE='/nix/store' -export NIX_STORE -STRIP='strip' -export STRIP -preferLocalBuild='1' -export preferLocalBuild -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -mesonFlags='' -export mesonFlags -NIX_NO_SELF_RPATH='1' -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -SIZE='size' -export SIZE -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -declare -a envBuildBuildHooks=() -doCheck='' -export doCheck -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -getTargetRole () -{ - - getRole "$targetOffset" -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -getHostRole () -{ - - getRole "$hostOffset" -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/devenv-envPiF66L/script \ No newline at end of file diff --git a/.devenv/shell-4a9089e6e3ce3083.sh b/.devenv/shell-4a9089e6e3ce3083.sh deleted file mode 100755 index 76bda9e..0000000 --- a/.devenv/shell-4a9089e6e3ce3083.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -depsBuildTarget='' -export depsBuildTarget -__structuredAttrs='' -export __structuredAttrs -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -NIX_STORE='/nix/store' -export NIX_STORE -patches='' -export patches -declare -a pkgsTargetTarget=() -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -CC='gcc' -export CC -declare -a pkgsHostHost=() -READELF='readelf' -export READELF -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -LINENO='79' -preferLocalBuild='1' -export preferLocalBuild -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -outputMan='out' -PKG_CONFIG='pkg-config' -export PKG_CONFIG -outputDevdoc='REMOVE' -AR='ar' -export AR -OSTYPE='linux-gnu' -outputDoc='out' -propagatedBuildInputs='' -export propagatedBuildInputs -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -STRIP='strip' -export STRIP -_substituteStream_has_warned_replace_deprecation='false' -outputInfo='out' -DEVENV_TASK_FILE='/nix/store/gj888l55lxj0brzhkjrdcald7zw7pskj-tasks.json' -export DEVENV_TASK_FILE -OLDPWD='' -export OLDPWD -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -outputDevman='out' -STRINGS='strings' -export STRINGS -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -system='x86_64-linux' -export system -defaultBuildInputs='' -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -NIX_LDFLAGS='-rpath /nix/store/ri1qpz22jmpid9xdlwjwwjv972rdl7rn-devenv-shell-env/lib ' -export NIX_LDFLAGS -declare -a envBuildHostHooks=() -configureFlags='' -export configureFlags -phases='buildPhase' -export phases -outputLib='out' -MACHTYPE='x86_64-pc-linux-gnu' -doInstallCheck='' -export doInstallCheck -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -PS4='+ ' -mesonFlags='' -export mesonFlags -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -NM='nm' -export NM -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -declare -a preConfigureHooks=('_multioutConfig' ) -depsBuildBuild='' -export depsBuildBuild -depsHostHostPropagated='' -export depsHostHostPropagated -hardeningDisable='' -export hardeningDisable -outputs='out' -export outputs -SIZE='size' -export SIZE -outputBin='out' -prefix='/nix/store/ri1qpz22jmpid9xdlwjwwjv972rdl7rn-devenv-shell-env' -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -declare -a envBuildBuildHooks=() -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -depsHostHost='' -export depsHostHost -NIX_CFLAGS_COMPILE=' -frandom-seed=ri1qpz22jm -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -declare -a pkgsHostTarget=() -cmakeFlags='' -export cmakeFlags -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -NIX_NO_SELF_RPATH='1' -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -name='devenv-shell-env' -export name -OPTERR='1' -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -declare -a pkgsBuildTarget=() -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -outputInclude='out' -LD='ld' -export LD -HOSTTYPE='x86_64' -IFS=' -' -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -declare -a pkgsBuildBuild=() -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -DEVENV_TASKS='' -export DEVENV_TASKS -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -RANLIB='ranlib' -export RANLIB -AS='as' -export AS -CXX='g++' -export CXX -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -outputDev='out' -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -declare -a envTargetTargetHooks=() -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a unpackCmdHooks=('_defaultUnpack' ) -out='/nix/store/ri1qpz22jmpid9xdlwjwwjv972rdl7rn-devenv-shell-env' -export out -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp/nix-shell-28554-2490132097 - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -depsTargetTarget='' -export depsTargetTarget -declare -a envBuildTargetHooks=() -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -OBJDUMP='objdump' -export OBJDUMP -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -OBJCOPY='objcopy' -export OBJCOPY -strictDeps='' -export strictDeps -doCheck='' -export doCheck -buildInputs='' -export buildInputs -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -getHostRole () -{ - - getRole "$hostOffset" -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -getTargetRole () -{ - - getRole "$targetOffset" -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/nix-shell-28554-2490132097/devenv-envxuYt7t/script \ No newline at end of file diff --git a/.devenv/shell-50ea0b87d2caf049.sh b/.devenv/shell-50ea0b87d2caf049.sh deleted file mode 100755 index 3be4e2f..0000000 --- a/.devenv/shell-50ea0b87d2caf049.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -__structuredAttrs='' -export __structuredAttrs -buildInputs='' -export buildInputs -declare -a pkgsBuildTarget=() -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -phases='buildPhase' -export phases -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -doInstallCheck='' -export doInstallCheck -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -HOSTTYPE='x86_64' -declare -a pkgsBuildBuild=() -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -OPTERR='1' -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -outputDevdoc='REMOVE' -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -OLDPWD='' -export OLDPWD -declare -a envBuildTargetHooks=() -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp/nix-shell-28554-2490132097 - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -preferLocalBuild='1' -export preferLocalBuild -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -CC='gcc' -export CC -patches='' -export patches -LINENO='79' -defaultBuildInputs='' -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -READELF='readelf' -export READELF -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -declare -a pkgsHostHost=() -DEVENV_TASK_FILE='/nix/store/2f9x4skfyh2x0rkfacr2w0v3c2vm405w-tasks.json' -export DEVENV_TASK_FILE -outputInclude='out' -outputDev='out' -declare -a pkgsTargetTarget=() -RANLIB='ranlib' -export RANLIB -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -declare -a envBuildBuildHooks=() -declare -a unpackCmdHooks=('_defaultUnpack' ) -AS='as' -export AS -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -outputBin='out' -strictDeps='' -export strictDeps -mesonFlags='' -export mesonFlags -name='devenv-shell-env' -export name -cmakeFlags='' -export cmakeFlags -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -_substituteStream_has_warned_replace_deprecation='false' -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -NM='nm' -export NM -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -declare -a envBuildHostHooks=() -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -SIZE='size' -export SIZE -IFS=' -' -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -depsHostHostPropagated='' -export depsHostHostPropagated -outputMan='out' -depsHostHost='' -export depsHostHost -outputs='out' -export outputs -depsBuildTarget='' -export depsBuildTarget -PS4='+ ' -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -propagatedBuildInputs='' -export propagatedBuildInputs -NIX_LDFLAGS='-rpath /nix/store/xx416ncq4i0859nxb4kixq97rx8lk2p5-devenv-shell-env/lib ' -export NIX_LDFLAGS -OBJDUMP='objdump' -export OBJDUMP -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -declare -a preConfigureHooks=('_multioutConfig' ) -CXX='g++' -export CXX -OBJCOPY='objcopy' -export OBJCOPY -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -STRINGS='strings' -export STRINGS -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -LD='ld' -export LD -depsTargetTarget='' -export depsTargetTarget -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -DEVENV_TASKS='' -export DEVENV_TASKS -declare -a envTargetTargetHooks=() -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -NIX_STORE='/nix/store' -export NIX_STORE -declare -a pkgsHostTarget=() -outputDevman='out' -NIX_NO_SELF_RPATH='1' -NIX_CFLAGS_COMPILE=' -frandom-seed=xx416ncq4i -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -configureFlags='' -export configureFlags -doCheck='' -export doCheck -OSTYPE='linux-gnu' -STRIP='strip' -export STRIP -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -system='x86_64-linux' -export system -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -outputLib='out' -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -AR='ar' -export AR -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -depsBuildBuild='' -export depsBuildBuild -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -out='/nix/store/xx416ncq4i0859nxb4kixq97rx8lk2p5-devenv-shell-env' -export out -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -MACHTYPE='x86_64-pc-linux-gnu' -PKG_CONFIG='pkg-config' -export PKG_CONFIG -prefix='/nix/store/xx416ncq4i0859nxb4kixq97rx8lk2p5-devenv-shell-env' -outputDoc='out' -outputInfo='out' -hardeningDisable='' -export hardeningDisable -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -getHostRole () -{ - - getRole "$hostOffset" -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -getTargetRole () -{ - - getRole "$targetOffset" -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/nix-shell-28554-2490132097/devenv-envCkVIcy/script \ No newline at end of file diff --git a/.devenv/shell-7f08e6d76227994d.sh b/.devenv/shell-7f08e6d76227994d.sh deleted file mode 100755 index 7ba71ca..0000000 --- a/.devenv/shell-7f08e6d76227994d.sh +++ /dev/null @@ -1,2265 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -depsTargetTarget='' -export depsTargetTarget -declare -a preConfigureHooks=('_multioutConfig' ) -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -cmakeFlags='' -export cmakeFlags -outputInclude='out' -outputDoc='out' -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -RANLIB='ranlib' -export RANLIB -_substituteStream_has_warned_replace_deprecation='false' -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -declare -a envBuildHostHooks=() -declare -a pkgsHostHost=() -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -DEVENV_TASK_FILE='/nix/store/vsp3fis0yyfrw5zdw1r908cz5wkwy1qs-tasks.json' -export DEVENV_TASK_FILE -declare -a envBuildTargetHooks=() -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -HOSTTYPE='x86_64' -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -STRINGS='strings' -export STRINGS -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -NIX_NO_SELF_RPATH='1' -declare -a pkgsBuildBuild=() -name='devenv-shell-env' -export name -OLDPWD='' -export OLDPWD -outputMan='out' -configureFlags='' -export configureFlags -declare -a envTargetTargetHooks=() -__structuredAttrs='' -export __structuredAttrs -propagatedBuildInputs='' -export propagatedBuildInputs -IFS=' -' -LD='ld' -export LD -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -STRIP='strip' -export STRIP -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -outputs='out' -export outputs -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -declare -a pkgsTargetTarget=() -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -outputBin='out' -OBJDUMP='objdump' -export OBJDUMP -prefix='/nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env' -outputDevdoc='REMOVE' -system='x86_64-linux' -export system -outputDev='out' -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -NM='nm' -export NM -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -depsBuildTarget='' -export depsBuildTarget -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -strictDeps='' -export strictDeps -MACHTYPE='x86_64-pc-linux-gnu' -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -defaultBuildInputs='' -DEVENV_TASKS='' -export DEVENV_TASKS -PKG_CONFIG='pkg-config' -export PKG_CONFIG -OSTYPE='linux-gnu' -mesonFlags='' -export mesonFlags -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -hardeningDisable='' -export hardeningDisable -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a pkgsBuildTarget=() -doInstallCheck='' -export doInstallCheck -CC='gcc' -export CC -OBJCOPY='objcopy' -export OBJCOPY -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -depsBuildBuild='' -export depsBuildBuild -phases='buildPhase' -export phases -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -out='/nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env' -export out -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -NIX_CFLAGS_COMPILE=' -frandom-seed=y5k9a31603 -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -NIX_LDFLAGS='-rpath /nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env/lib ' -export NIX_LDFLAGS -buildInputs='' -export buildInputs -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -NIX_STORE='/nix/store' -export NIX_STORE -depsHostHostPropagated='' -export depsHostHostPropagated -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -doCheck='' -export doCheck -outputInfo='out' -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -patches='' -export patches -outputLib='out' -declare -a pkgsHostTarget=() -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -AR='ar' -export AR -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -depsHostHost='' -export depsHostHost -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - -echo "💡 A dotenv file was found, while dotenv integration is currently not enabled." >&2 -echo >&2 -echo " To enable it, add \`dotenv.enable = true;\` to your devenv.nix file." >&2; -echo " To disable this hint, add \`dotenv.disableHint = true;\` to your devenv.nix file." >&2; -echo >&2 -echo "See https://devenv.sh/integrations/dotenv/ for more information." >&2; - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -preferLocalBuild='1' -export preferLocalBuild -declare -a unpackCmdHooks=('_defaultUnpack' ) -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -SIZE='size' -export SIZE -AS='as' -export AS -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -READELF='readelf' -export READELF -LINENO='79' -declare -a envBuildBuildHooks=() -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -OPTERR='1' -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -CXX='g++' -export CXX -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -PS4='+ ' -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -outputDevman='out' -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -getHostRole () -{ - - getRole "$hostOffset" -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -getTargetRole () -{ - - getRole "$targetOffset" -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/devenv-env7BrCS2/script \ No newline at end of file diff --git a/.devenv/shell-93a57e7732b1fa8a.sh b/.devenv/shell-93a57e7732b1fa8a.sh deleted file mode 100755 index 84143c0..0000000 --- a/.devenv/shell-93a57e7732b1fa8a.sh +++ /dev/null @@ -1,2265 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -CXX='g++' -export CXX -cmakeFlags='' -export cmakeFlags -RANLIB='ranlib' -export RANLIB -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -LINENO='79' -declare -a pkgsHostHost=() -patches='' -export patches -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -AR='ar' -export AR -declare -a pkgsTargetTarget=() -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -declare -a preConfigureHooks=('_multioutConfig' ) -NM='nm' -export NM -MACHTYPE='x86_64-pc-linux-gnu' -NIX_STORE='/nix/store' -export NIX_STORE -declare -a pkgsBuildTarget=() -system='x86_64-linux' -export system -declare -a envBuildBuildHooks=() -doInstallCheck='' -export doInstallCheck -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -PKG_CONFIG='pkg-config' -export PKG_CONFIG -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -HOSTTYPE='x86_64' -PS4='+ ' -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -declare -a pkgsBuildBuild=() -depsTargetTarget='' -export depsTargetTarget -preferLocalBuild='1' -export preferLocalBuild -OPTERR='1' -outputMan='out' -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -name='devenv-shell-env' -export name -outputDev='out' -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -SIZE='size' -export SIZE -depsHostHost='' -export depsHostHost -prefix='/nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env' -LD='ld' -export LD -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -declare -a pkgsHostTarget=() -AS='as' -export AS -OSTYPE='linux-gnu' -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -outputBin='out' -depsBuildBuild='' -export depsBuildBuild -declare -a envTargetTargetHooks=() -outputDevdoc='REMOVE' -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -buildInputs='' -export buildInputs -depsHostHostPropagated='' -export depsHostHostPropagated -NIX_LDFLAGS='-rpath /nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env/lib ' -export NIX_LDFLAGS -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -outputInclude='out' -STRINGS='strings' -export STRINGS -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -defaultBuildInputs='' -declare -a envBuildTargetHooks=() -doCheck='' -export doCheck -IFS=' -' -outputInfo='out' -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - -echo "💡 A dotenv file was found, while dotenv integration is currently not enabled." >&2 -echo >&2 -echo " To enable it, add \`dotenv.enable = true;\` to your devenv.nix file." >&2; -echo " To disable this hint, add \`dotenv.disableHint = true;\` to your devenv.nix file." >&2; -echo >&2 -echo "See https://devenv.sh/integrations/dotenv/ for more information." >&2; - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -NIX_CFLAGS_COMPILE=' -frandom-seed=y5k9a31603 -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -outputDevman='out' -propagatedBuildInputs='' -export propagatedBuildInputs -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -strictDeps='' -export strictDeps -OLDPWD='' -export OLDPWD -STRIP='strip' -export STRIP -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -declare -a unpackCmdHooks=('_defaultUnpack' ) -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -_substituteStream_has_warned_replace_deprecation='false' -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -out='/nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env' -export out -CC='gcc' -export CC -depsBuildTarget='' -export depsBuildTarget -outputDoc='out' -OBJDUMP='objdump' -export OBJDUMP -mesonFlags='' -export mesonFlags -OBJCOPY='objcopy' -export OBJCOPY -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -READELF='readelf' -export READELF -DEVENV_TASKS='' -export DEVENV_TASKS -hardeningDisable='' -export hardeningDisable -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -DEVENV_TASK_FILE='/nix/store/vsp3fis0yyfrw5zdw1r908cz5wkwy1qs-tasks.json' -export DEVENV_TASK_FILE -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -outputLib='out' -NIX_NO_SELF_RPATH='1' -outputs='out' -export outputs -declare -a envBuildHostHooks=() -configureFlags='' -export configureFlags -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -__structuredAttrs='' -export __structuredAttrs -phases='buildPhase' -export phases -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -getTargetRole () -{ - - getRole "$targetOffset" -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -getHostRole () -{ - - getRole "$hostOffset" -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/devenv-envzO5NIW/script \ No newline at end of file diff --git a/.devenv/shell-9b7949b96e5561ee.sh b/.devenv/shell-9b7949b96e5561ee.sh deleted file mode 100755 index 281776d..0000000 --- a/.devenv/shell-9b7949b96e5561ee.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -SIZE='size' -export SIZE -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -declare -a pkgsBuildBuild=() -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -depsBuildTarget='' -export depsBuildTarget -NIX_LDFLAGS='-rpath /nix/store/ri1qpz22jmpid9xdlwjwwjv972rdl7rn-devenv-shell-env/lib ' -export NIX_LDFLAGS -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -OSTYPE='linux-gnu' -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -declare -a pkgsHostHost=() -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -out='/nix/store/ri1qpz22jmpid9xdlwjwwjv972rdl7rn-devenv-shell-env' -export out -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -outputMan='out' -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -declare -a pkgsBuildTarget=() -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -outputLib='out' -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -NIX_STORE='/nix/store' -export NIX_STORE -phases='buildPhase' -export phases -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -STRIP='strip' -export STRIP -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -strictDeps='' -export strictDeps -outputBin='out' -preferLocalBuild='1' -export preferLocalBuild -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -configureFlags='' -export configureFlags -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -AR='ar' -export AR -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -declare -a envBuildHostHooks=() -outputDev='out' -propagatedBuildInputs='' -export propagatedBuildInputs -buildInputs='' -export buildInputs -LD='ld' -export LD -declare -a preConfigureHooks=('_multioutConfig' ) -OBJDUMP='objdump' -export OBJDUMP -patches='' -export patches -DEVENV_TASK_FILE='/nix/store/gj888l55lxj0brzhkjrdcald7zw7pskj-tasks.json' -export DEVENV_TASK_FILE -__structuredAttrs='' -export __structuredAttrs -outputDevdoc='REMOVE' -_substituteStream_has_warned_replace_deprecation='false' -READELF='readelf' -export READELF -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -NIX_CFLAGS_COMPILE=' -frandom-seed=ri1qpz22jm -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -outputs='out' -export outputs -NM='nm' -export NM -STRINGS='strings' -export STRINGS -IFS=' -' -declare -a envBuildTargetHooks=() -declare -a pkgsHostTarget=() -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -OBJCOPY='objcopy' -export OBJCOPY -name='devenv-shell-env' -export name -OPTERR='1' -RANLIB='ranlib' -export RANLIB -CXX='g++' -export CXX -outputInfo='out' -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -declare -a envBuildBuildHooks=() -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp/nix-shell-28554-2490132097 - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -prefix='/nix/store/ri1qpz22jmpid9xdlwjwwjv972rdl7rn-devenv-shell-env' -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -depsBuildBuild='' -export depsBuildBuild -NIX_NO_SELF_RPATH='1' -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -HOSTTYPE='x86_64' -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -LINENO='79' -hardeningDisable='' -export hardeningDisable -depsHostHost='' -export depsHostHost -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -PKG_CONFIG='pkg-config' -export PKG_CONFIG -depsTargetTarget='' -export depsTargetTarget -declare -a unpackCmdHooks=('_defaultUnpack' ) -outputInclude='out' -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -system='x86_64-linux' -export system -cmakeFlags='' -export cmakeFlags -AS='as' -export AS -depsHostHostPropagated='' -export depsHostHostPropagated -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -DEVENV_TASKS='' -export DEVENV_TASKS -doInstallCheck='' -export doInstallCheck -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -outputDoc='out' -PS4='+ ' -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -declare -a pkgsTargetTarget=() -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -defaultBuildInputs='' -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -doCheck='' -export doCheck -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -MACHTYPE='x86_64-pc-linux-gnu' -outputDevman='out' -mesonFlags='' -export mesonFlags -CC='gcc' -export CC -OLDPWD='' -export OLDPWD -declare -a envTargetTargetHooks=() -getHostRole () -{ - - getRole "$hostOffset" -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -getTargetRole () -{ - - getRole "$targetOffset" -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/nix-shell-28554-2490132097/devenv-envgm7jCR/script \ No newline at end of file diff --git a/.devenv/shell-ad083a082e46f0e9.sh b/.devenv/shell-ad083a082e46f0e9.sh deleted file mode 100755 index 3cdd5c9..0000000 --- a/.devenv/shell-ad083a082e46f0e9.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -preferLocalBuild='1' -export preferLocalBuild -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -declare -a envBuildBuildHooks=() -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -outputDevman='out' -outputInfo='out' -NM='nm' -export NM -DEVENV_TASK_FILE='/nix/store/vsp3fis0yyfrw5zdw1r908cz5wkwy1qs-tasks.json' -export DEVENV_TASK_FILE -_substituteStream_has_warned_replace_deprecation='false' -doCheck='' -export doCheck -outputInclude='out' -CXX='g++' -export CXX -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -declare -a pkgsHostTarget=() -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -LINENO='79' -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -out='/nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env' -export out -OBJCOPY='objcopy' -export OBJCOPY -NIX_CFLAGS_COMPILE=' -frandom-seed=yg7s9k8slf -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -depsBuildTarget='' -export depsBuildTarget -patches='' -export patches -READELF='readelf' -export READELF -buildInputs='' -export buildInputs -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -NIX_NO_SELF_RPATH='1' -outputDevdoc='REMOVE' -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -declare -a preConfigureHooks=('_multioutConfig' ) -RANLIB='ranlib' -export RANLIB -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -MACHTYPE='x86_64-pc-linux-gnu' -outputs='out' -export outputs -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -depsHostHost='' -export depsHostHost -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -OSTYPE='linux-gnu' -hardeningDisable='' -export hardeningDisable -DEVENV_TASKS='' -export DEVENV_TASKS -depsHostHostPropagated='' -export depsHostHostPropagated -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -LD='ld' -export LD -NIX_LDFLAGS='-rpath /nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env/lib ' -export NIX_LDFLAGS -OBJDUMP='objdump' -export OBJDUMP -OPTERR='1' -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -system='x86_64-linux' -export system -strictDeps='' -export strictDeps -outputLib='out' -cmakeFlags='' -export cmakeFlags -__structuredAttrs='' -export __structuredAttrs -STRINGS='strings' -export STRINGS -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -declare -a pkgsBuildBuild=() -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -OLDPWD='' -export OLDPWD -outputDev='out' -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -phases='buildPhase' -export phases -CC='gcc' -export CC -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -depsTargetTarget='' -export depsTargetTarget -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -declare -a envBuildHostHooks=() -name='devenv-shell-env' -export name -SIZE='size' -export SIZE -defaultBuildInputs='' -configureFlags='' -export configureFlags -outputMan='out' -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -HOSTTYPE='x86_64' -NIX_STORE='/nix/store' -export NIX_STORE -outputBin='out' -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -STRIP='strip' -export STRIP -prefix='/nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env' -mesonFlags='' -export mesonFlags -declare -a unpackCmdHooks=('_defaultUnpack' ) -declare -a pkgsTargetTarget=() -PS4='+ ' -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -declare -a envTargetTargetHooks=() -declare -a pkgsBuildTarget=() -outputDoc='out' -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -IFS=' -' -AS='as' -export AS -depsBuildBuild='' -export depsBuildBuild -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -doInstallCheck='' -export doInstallCheck -declare -a pkgsHostHost=() -propagatedBuildInputs='' -export propagatedBuildInputs -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -PKG_CONFIG='pkg-config' -export PKG_CONFIG -AR='ar' -export AR -declare -a envBuildTargetHooks=() -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -getHostRole () -{ - - getRole "$hostOffset" -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -getTargetRole () -{ - - getRole "$targetOffset" -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/devenv-envJwdAge/script \ No newline at end of file diff --git a/.devenv/shell-bc17db56c7f8a19a.sh b/.devenv/shell-bc17db56c7f8a19a.sh deleted file mode 100755 index 972711b..0000000 --- a/.devenv/shell-bc17db56c7f8a19a.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -propagatedBuildInputs='' -export propagatedBuildInputs -OBJDUMP='objdump' -export OBJDUMP -RANLIB='ranlib' -export RANLIB -IFS=' -' -OSTYPE='linux-gnu' -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -SIZE='size' -export SIZE -defaultBuildInputs='' -depsBuildTarget='' -export depsBuildTarget -AR='ar' -export AR -NIX_STORE='/nix/store' -export NIX_STORE -outputs='out' -export outputs -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -STRIP='strip' -export STRIP -declare -a envTargetTargetHooks=() -outputDevman='out' -declare -a preConfigureHooks=('_multioutConfig' ) -DEVENV_TASK_FILE='/nix/store/2f9x4skfyh2x0rkfacr2w0v3c2vm405w-tasks.json' -export DEVENV_TASK_FILE -depsTargetTarget='' -export depsTargetTarget -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -declare -a envBuildHostHooks=() -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -configureFlags='' -export configureFlags -name='devenv-shell-env' -export name -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -hardeningDisable='' -export hardeningDisable -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -depsBuildBuild='' -export depsBuildBuild -outputInclude='out' -system='x86_64-linux' -export system -HOSTTYPE='x86_64' -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -NM='nm' -export NM -outputMan='out' -outputBin='out' -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -CXX='g++' -export CXX -__structuredAttrs='' -export __structuredAttrs -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -declare -a pkgsHostTarget=() -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -PKG_CONFIG='pkg-config' -export PKG_CONFIG -outputDev='out' -preferLocalBuild='1' -export preferLocalBuild -READELF='readelf' -export READELF -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -doCheck='' -export doCheck -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -declare -a pkgsHostHost=() -declare -a envBuildBuildHooks=() -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -DEVENV_TASKS='' -export DEVENV_TASKS -CC='gcc' -export CC -mesonFlags='' -export mesonFlags -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -NIX_CFLAGS_COMPILE=' -frandom-seed=xx416ncq4i -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -LINENO='79' -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -outputDoc='out' -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -depsHostHostPropagated='' -export depsHostHostPropagated -depsHostHost='' -export depsHostHost -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -patches='' -export patches -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -STRINGS='strings' -export STRINGS -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -declare -a envBuildTargetHooks=() -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -phases='buildPhase' -export phases -AS='as' -export AS -MACHTYPE='x86_64-pc-linux-gnu' -NIX_NO_SELF_RPATH='1' -OLDPWD='' -export OLDPWD -LD='ld' -export LD -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -declare -a pkgsBuildTarget=() -declare -a pkgsTargetTarget=() -OBJCOPY='objcopy' -export OBJCOPY -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -outputLib='out' -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -declare -a pkgsBuildBuild=() -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -outputInfo='out' -OPTERR='1' -declare -a unpackCmdHooks=('_defaultUnpack' ) -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp/nix-shell-28554-2490132097 - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -doInstallCheck='' -export doInstallCheck -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -NIX_LDFLAGS='-rpath /nix/store/xx416ncq4i0859nxb4kixq97rx8lk2p5-devenv-shell-env/lib ' -export NIX_LDFLAGS -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -cmakeFlags='' -export cmakeFlags -prefix='/nix/store/xx416ncq4i0859nxb4kixq97rx8lk2p5-devenv-shell-env' -out='/nix/store/xx416ncq4i0859nxb4kixq97rx8lk2p5-devenv-shell-env' -export out -buildInputs='' -export buildInputs -strictDeps='' -export strictDeps -PS4='+ ' -_substituteStream_has_warned_replace_deprecation='false' -outputDevdoc='REMOVE' -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -getTargetRole () -{ - - getRole "$targetOffset" -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -getHostRole () -{ - - getRole "$hostOffset" -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/nix-shell-28554-2490132097/devenv-envGtfK7b/script \ No newline at end of file diff --git a/.devenv/shell-d2d0e9bf7bb10942.sh b/.devenv/shell-d2d0e9bf7bb10942.sh deleted file mode 100755 index bc8d8e2..0000000 --- a/.devenv/shell-d2d0e9bf7bb10942.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -outputLib='out' -NIX_LDFLAGS='-rpath /nix/store/qyvdk0h2xf5ynj2xn5lvml95m7cwyydb-devenv-shell-env/lib ' -export NIX_LDFLAGS -depsTargetTarget='' -export depsTargetTarget -declare -a pkgsHostTarget=() -IFS=' -' -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a envBuildTargetHooks=() -name='devenv-shell-env' -export name -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -depsHostHost='' -export depsHostHost -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -AR='ar' -export AR -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -configureFlags='' -export configureFlags -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -PKG_CONFIG='pkg-config' -export PKG_CONFIG -mesonFlags='' -export mesonFlags -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a envTargetTargetHooks=() -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -outputBin='out' -NM='nm' -export NM -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -doCheck='' -export doCheck -outputs='out' -export outputs -RANLIB='ranlib' -export RANLIB -declare -a unpackCmdHooks=('_defaultUnpack' ) -OLDPWD='' -export OLDPWD -DEVENV_TASK_FILE='/nix/store/b2d7b32aqvalmd56ajdh1cvyk0bmgldz-tasks.json' -export DEVENV_TASK_FILE -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -OBJDUMP='objdump' -export OBJDUMP -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -outputDoc='out' -LD='ld' -export LD -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -depsBuildBuild='' -export depsBuildBuild -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -STRIP='strip' -export STRIP -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -outputDevman='out' -CC='gcc' -export CC -_substituteStream_has_warned_replace_deprecation='false' -declare -a preConfigureHooks=('_multioutConfig' ) -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -strictDeps='' -export strictDeps -declare -a pkgsBuildTarget=() -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -OSTYPE='linux-gnu' -MACHTYPE='x86_64-pc-linux-gnu' -system='x86_64-linux' -export system -buildInputs='' -export buildInputs -depsHostHostPropagated='' -export depsHostHostPropagated -outputMan='out' -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -cmakeFlags='' -export cmakeFlags -defaultBuildInputs='' -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -preferLocalBuild='1' -export preferLocalBuild -NIX_STORE='/nix/store' -export NIX_STORE -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -DEVENV_TASKS='' -export DEVENV_TASKS -OBJCOPY='objcopy' -export OBJCOPY -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -depsBuildTarget='' -export depsBuildTarget -doInstallCheck='' -export doInstallCheck -phases='buildPhase' -export phases -out='/nix/store/qyvdk0h2xf5ynj2xn5lvml95m7cwyydb-devenv-shell-env' -export out -NIX_NO_SELF_RPATH='1' -OPTERR='1' -prefix='/nix/store/qyvdk0h2xf5ynj2xn5lvml95m7cwyydb-devenv-shell-env' -outputDevdoc='REMOVE' -READELF='readelf' -export READELF -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -SIZE='size' -export SIZE -outputInfo='out' -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -patches='' -export patches -declare -a pkgsBuildBuild=() -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -declare -a pkgsHostHost=() -declare -a envBuildBuildHooks=() -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -declare -a envBuildHostHooks=() -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -declare -a pkgsTargetTarget=() -HOSTTYPE='x86_64' -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -__structuredAttrs='' -export __structuredAttrs -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -NIX_CFLAGS_COMPILE=' -frandom-seed=qyvdk0h2xf -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -AS='as' -export AS -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -propagatedBuildInputs='' -export propagatedBuildInputs -CXX='g++' -export CXX -hardeningDisable='' -export hardeningDisable -outputInclude='out' -LINENO='79' -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -STRINGS='strings' -export STRINGS -outputDev='out' -PS4='+ ' -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -getTargetRole () -{ - - getRole "$targetOffset" -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -getHostRole () -{ - - getRole "$hostOffset" -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/devenv-envNo1n37/script \ No newline at end of file diff --git a/.devenv/shell-deca24b8fe0d1abe.sh b/.devenv/shell-deca24b8fe0d1abe.sh deleted file mode 100755 index ffa877f..0000000 --- a/.devenv/shell-deca24b8fe0d1abe.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -depsBuildTarget='' -export depsBuildTarget -NIX_CFLAGS_COMPILE=' -frandom-seed=g3n8670da0 -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -outputInfo='out' -prefix='/nix/store/g3n8670da0n1hrcg7bi4q0z55zln74yi-devenv-shell-env' -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -configureFlags='' -export configureFlags -OPTERR='1' -declare -a envBuildTargetHooks=() -outputInclude='out' -RANLIB='ranlib' -export RANLIB -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -READELF='readelf' -export READELF -__structuredAttrs='' -export __structuredAttrs -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -phases='buildPhase' -export phases -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -defaultBuildInputs='' -depsTargetTarget='' -export depsTargetTarget -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -OLDPWD='' -export OLDPWD -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -CXX='g++' -export CXX -patches='' -export patches -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -AR='ar' -export AR -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -declare -a pkgsHostTarget=() -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -declare -a pkgsHostHost=() -PS4='+ ' -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -DEVENV_TASK_FILE='/nix/store/ba6jcphi2rcih5v4fp554w2l9m2hcylp-tasks.json' -export DEVENV_TASK_FILE -outputMan='out' -OSTYPE='linux-gnu' -IFS=' -' -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -propagatedBuildInputs='' -export propagatedBuildInputs -strictDeps='' -export strictDeps -NM='nm' -export NM -declare -a pkgsBuildBuild=() -_substituteStream_has_warned_replace_deprecation='false' -cmakeFlags='' -export cmakeFlags -mesonFlags='' -export mesonFlags -name='devenv-shell-env' -export name -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -SIZE='size' -export SIZE -buildInputs='' -export buildInputs -system='x86_64-linux' -export system -DEVENV_TASKS='' -export DEVENV_TASKS -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -hardeningDisable='' -export hardeningDisable -NIX_STORE='/nix/store' -export NIX_STORE -OBJCOPY='objcopy' -export OBJCOPY -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -outputDevman='out' -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -STRINGS='strings' -export STRINGS -depsBuildBuild='' -export depsBuildBuild -declare -a pkgsTargetTarget=() -declare -a envTargetTargetHooks=() -AS='as' -export AS -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -STRIP='strip' -export STRIP -declare -a unpackCmdHooks=('_defaultUnpack' ) -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -CC='gcc' -export CC -LINENO='79' -doCheck='' -export doCheck -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -outputs='out' -export outputs -NIX_NO_SELF_RPATH='1' -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -depsHostHostPropagated='' -export depsHostHostPropagated -MACHTYPE='x86_64-pc-linux-gnu' -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -outputDoc='out' -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -doInstallCheck='' -export doInstallCheck -PKG_CONFIG='pkg-config' -export PKG_CONFIG -declare -a pkgsBuildTarget=() -out='/nix/store/g3n8670da0n1hrcg7bi4q0z55zln74yi-devenv-shell-env' -export out -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -LD='ld' -export LD -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -outputDev='out' -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -outputLib='out' -HOSTTYPE='x86_64' -NIX_LDFLAGS='-rpath /nix/store/g3n8670da0n1hrcg7bi4q0z55zln74yi-devenv-shell-env/lib ' -export NIX_LDFLAGS -declare -a envBuildBuildHooks=() -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -outputDevdoc='REMOVE' -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp/nix-shell-28554-2490132097 - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -preferLocalBuild='1' -export preferLocalBuild -declare -a envBuildHostHooks=() -declare -a preConfigureHooks=('_multioutConfig' ) -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -OBJDUMP='objdump' -export OBJDUMP -outputBin='out' -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -depsHostHost='' -export depsHostHost -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -getHostRole () -{ - - getRole "$hostOffset" -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -getTargetRole () -{ - - getRole "$targetOffset" -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/nix-shell-28554-2490132097/devenv-envrGBlfo/script \ No newline at end of file diff --git a/.devenv/shell-e893b9157f2d2e31.sh b/.devenv/shell-e893b9157f2d2e31.sh deleted file mode 100755 index 09bd4a6..0000000 --- a/.devenv/shell-e893b9157f2d2e31.sh +++ /dev/null @@ -1,2265 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -propagatedBuildInputs='' -export propagatedBuildInputs -HOSTTYPE='x86_64' -depsBuildBuild='' -export depsBuildBuild -MACHTYPE='x86_64-pc-linux-gnu' -name='devenv-shell-env' -export name -OSTYPE='linux-gnu' -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -buildInputs='' -export buildInputs -mesonFlags='' -export mesonFlags -prefix='/nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env' -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -strictDeps='' -export strictDeps -declare -a unpackCmdHooks=('_defaultUnpack' ) -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -outputInclude='out' -SIZE='size' -export SIZE -OLDPWD='' -export OLDPWD -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -READELF='readelf' -export READELF -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -AR='ar' -export AR -out='/nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env' -export out -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -depsTargetTarget='' -export depsTargetTarget -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -defaultBuildInputs='' -outputDoc='out' -declare -a pkgsBuildBuild=() -OPTERR='1' -declare -a envTargetTargetHooks=() -NIX_STORE='/nix/store' -export NIX_STORE -outputMan='out' -NIX_LDFLAGS='-rpath /nix/store/y5k9a31603208npmzpfsc2nrar2nn9xa-devenv-shell-env/lib ' -export NIX_LDFLAGS -declare -a preConfigureHooks=('_multioutConfig' ) -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -STRIP='strip' -export STRIP -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -DEVENV_TASK_FILE='/nix/store/vsp3fis0yyfrw5zdw1r908cz5wkwy1qs-tasks.json' -export DEVENV_TASK_FILE -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -DEVENV_TASKS='' -export DEVENV_TASKS -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -STRINGS='strings' -export STRINGS -PKG_CONFIG='pkg-config' -export PKG_CONFIG -outputDev='out' -_substituteStream_has_warned_replace_deprecation='false' -declare -a pkgsHostTarget=() -cmakeFlags='' -export cmakeFlags -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -depsHostHostPropagated='' -export depsHostHostPropagated -LD='ld' -export LD -outputInfo='out' -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -patches='' -export patches -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -outputDevdoc='REMOVE' -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -declare -a pkgsTargetTarget=() -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -declare -a pkgsBuildTarget=() -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -RANLIB='ranlib' -export RANLIB -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -outputBin='out' -CXX='g++' -export CXX -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -system='x86_64-linux' -export system -outputs='out' -export outputs -outputDevman='out' -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -depsHostHost='' -export depsHostHost -LINENO='79' -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - -echo "💡 A dotenv file was found, while dotenv integration is currently not enabled." >&2 -echo >&2 -echo " To enable it, add \`dotenv.enable = true;\` to your devenv.nix file." >&2; -echo " To disable this hint, add \`dotenv.disableHint = true;\` to your devenv.nix file." >&2; -echo >&2 -echo "See https://devenv.sh/integrations/dotenv/ for more information." >&2; - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -OBJDUMP='objdump' -export OBJDUMP -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -OBJCOPY='objcopy' -export OBJCOPY -doCheck='' -export doCheck -declare -a envBuildTargetHooks=() -outputLib='out' -preferLocalBuild='1' -export preferLocalBuild -CC='gcc' -export CC -configureFlags='' -export configureFlags -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -AS='as' -export AS -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -NIX_NO_SELF_RPATH='1' -declare -a envBuildHostHooks=() -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -IFS=' -' -__structuredAttrs='' -export __structuredAttrs -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -depsBuildTarget='' -export depsBuildTarget -NM='nm' -export NM -NIX_CFLAGS_COMPILE=' -frandom-seed=y5k9a31603 -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -PS4='+ ' -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -declare -a pkgsHostHost=() -doInstallCheck='' -export doInstallCheck -phases='buildPhase' -export phases -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -declare -a envBuildBuildHooks=() -hardeningDisable='' -export hardeningDisable -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -getTargetRole () -{ - - getRole "$targetOffset" -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -getHostRole () -{ - - getRole "$hostOffset" -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/devenv-envo15r5f/script \ No newline at end of file diff --git a/.devenv/shell-e8cdd2fa2b8a2526.sh b/.devenv/shell-e8cdd2fa2b8a2526.sh deleted file mode 100755 index 8fa6b56..0000000 --- a/.devenv/shell-e8cdd2fa2b8a2526.sh +++ /dev/null @@ -1,2258 +0,0 @@ -if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then - source $HOME/.bashrc; -fi - -shopt -u expand_aliases -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -PS4='+ ' -outputDevman='out' -OBJCOPY='objcopy' -export OBJCOPY -NIX_CFLAGS_COMPILE=' -frandom-seed=yg7s9k8slf -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -__structuredAttrs='' -export __structuredAttrs -outputDevdoc='REMOVE' -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -OPTERR='1' -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -declare -a preConfigureHooks=('_multioutConfig' ) -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -propagatedBuildInputs='' -export propagatedBuildInputs -DEVENV_TASKS='' -export DEVENV_TASKS -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -outputBin='out' -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -AR='ar' -export AR -outputs='out' -export outputs -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -OSTYPE='linux-gnu' -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -declare -a envBuildHostHooks=() -cmakeFlags='' -export cmakeFlags -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -READELF='readelf' -export READELF -STRINGS='strings' -export STRINGS -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -PKG_CONFIG='pkg-config' -export PKG_CONFIG -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -preferLocalBuild='1' -export preferLocalBuild -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -outputDev='out' -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -strictDeps='' -export strictDeps -LINENO='79' -MACHTYPE='x86_64-pc-linux-gnu' -NIX_NO_SELF_RPATH='1' -defaultBuildInputs='' -declare -a pkgsHostHost=() -doCheck='' -export doCheck -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -outputMan='out' -AS='as' -export AS -OBJDUMP='objdump' -export OBJDUMP -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -DEVENV_TASK_FILE='/nix/store/vsp3fis0yyfrw5zdw1r908cz5wkwy1qs-tasks.json' -export DEVENV_TASK_FILE -name='devenv-shell-env' -export name -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -declare -a pkgsHostTarget=() -STRIP='strip' -export STRIP -prefix='/nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env' -declare -a envTargetTargetHooks=() -_substituteStream_has_warned_replace_deprecation='false' -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -mesonFlags='' -export mesonFlags -phases='buildPhase' -export phases -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -LD='ld' -export LD -buildInputs='' -export buildInputs -IFS=' -' -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -depsHostHostPropagated='' -export depsHostHostPropagated -CXX='g++' -export CXX -NM='nm' -export NM -depsTargetTarget='' -export depsTargetTarget -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -depsHostHost='' -export depsHostHost -OLDPWD='' -export OLDPWD -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -CC='gcc' -export CC -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a envBuildTargetHooks=() -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -declare -a pkgsBuildBuild=() -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -HOSTTYPE='x86_64' -declare -a unpackCmdHooks=('_defaultUnpack' ) -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -depsBuildTarget='' -export depsBuildTarget -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -out='/nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env' -export out -configureFlags='' -export configureFlags -outputInclude='out' -doInstallCheck='' -export doInstallCheck -system='x86_64-linux' -export system -declare -a pkgsTargetTarget=() -RANLIB='ranlib' -export RANLIB -NIX_STORE='/nix/store' -export NIX_STORE -depsBuildBuild='' -export depsBuildBuild -declare -a envBuildBuildHooks=() -NIX_LDFLAGS='-rpath /nix/store/yg7s9k8slfsf5qchnjiwrrqxx0n1rn3l-devenv-shell-env/lib ' -export NIX_LDFLAGS -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -outputDoc='out' -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -outputInfo='out' -SIZE='size' -export SIZE -patches='' -export patches -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -declare -a pkgsBuildTarget=() -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -outputLib='out' -hardeningDisable='' -export hardeningDisable -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -getTargetRole () -{ - - getRole "$targetOffset" -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -getHostRole () -{ - - getRole "$hostOffset" -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" -shopt -s expand_aliases - -exec /tmp/devenv-envkaWM2E/script \ No newline at end of file diff --git a/.devenv/shell-env.sh b/.devenv/shell-env.sh deleted file mode 100644 index e183724..0000000 --- a/.devenv/shell-env.sh +++ /dev/null @@ -1,2250 +0,0 @@ -PATH=${PATH:-} -nix_saved_PATH="$PATH" -XDG_DATA_DIRS=${XDG_DATA_DIRS:-} -nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) -stdenv='/nix/store/jci7gw90lh2vdjaxkb6pzf9xp4v08wzs-stdenv-linux' -export stdenv -MACHTYPE='x86_64-pc-linux-gnu' -outputDevdoc='REMOVE' -preferLocalBuild='1' -export preferLocalBuild -NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -DEVENV_ROOT='/home/user01/Projects/score-system' -export DEVENV_ROOT -declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' ) -name='devenv-shell-env' -export name -IFS=' -' -READELF='readelf' -export READELF -CXX='g++' -export CXX -outputBin='out' -DEVENV_DOTFILE='/home/user01/Projects/score-system/.devenv' -export DEVENV_DOTFILE -shell='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export shell -NIX_LDFLAGS='-rpath /nix/store/r1k9z5ywad327dbsjyzngyv4zbja6hmp-devenv-shell-env/lib ' -export NIX_LDFLAGS -prefix='/nix/store/r1k9z5ywad327dbsjyzngyv4zbja6hmp-devenv-shell-env' -declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -depsBuildBuild='' -export depsBuildBuild -DEVENV_PROFILE='/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile' -export DEVENV_PROFILE -declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) -doInstallCheck='' -export doInstallCheck -outputDoc='out' -declare -a envBuildBuildHooks=() -declare -a pkgsBuildBuild=() -__structuredAttrs='' -export __structuredAttrs -STRINGS='strings' -export STRINGS -NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -buildInputs='' -export buildInputs -pkg='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -NIX_BINTOOLS='/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' -export NIX_BINTOOLS -builder='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export builder -SIZE='size' -export SIZE -out='/nix/store/r1k9z5ywad327dbsjyzngyv4zbja6hmp-devenv-shell-env' -export out -XDG_DATA_DIRS='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/share:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/share:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/share:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/share' -export XDG_DATA_DIRS -NM='nm' -export NM -OBJCOPY='objcopy' -export OBJCOPY -outputMan='out' -cmakeFlags='' -export cmakeFlags -DEVENV_RUNTIME='/run/user/1000/devenv-3f21a4e' -export DEVENV_RUNTIME -NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' -export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -initialPath='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11 /nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0 /nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12 /nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9 /nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12 /nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0 /nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35 /nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14 /nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin /nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1 /nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9 /nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8 /nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin /nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47' -declare -a envTargetTargetHooks=() -IN_NIX_SHELL='impure' -export IN_NIX_SHELL -depsHostHost='' -export depsHostHost -CONFIG_SHELL='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -export CONFIG_SHELL -propagatedNativeBuildInputs='' -export propagatedNativeBuildInputs -NIX_CFLAGS_COMPILE=' -frandom-seed=r1k9z5ywad -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include -isystem /nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/include' -export NIX_CFLAGS_COMPILE -patches='' -export patches -depsTargetTargetPropagated='' -export depsTargetTargetPropagated -BASH='/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin/bash' -outputDevman='out' -PS4='+ ' -hardeningDisable='' -export hardeningDisable -depsTargetTarget='' -export depsTargetTarget -preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' -declare -a pkgsHostTarget=() -shellHook=' - - -# Override temp directories that stdenv set to NIX_BUILD_TOP. -# Only reset those that still point to the Nix build dir; leave -# any user/CI-supplied value intact so child processes (e.g. -# `devenv processes wait`) compute the same runtime directory. -for var in TMP TMPDIR TEMP TEMPDIR; do - if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then - export "$var"=/tmp - fi -done -if [ -n "${NIX_BUILD_TOP-}" ]; then - unset NIX_BUILD_TOP -fi - -# set path to locales on non-NixOS Linux hosts -if [ -z "${LOCALE_ARCHIVE-}" ]; then - export LOCALE_ARCHIVE=/nix/store/3b5l8c2jipz2zgki0wc50vzwa2r9834a-glibc-locales-2.42-61/lib/locale/locale-archive -fi - - -# direnv helper -if [ ! type -p direnv &>/dev/null && -f .envrc ]; then - echo "An .envrc file was detected, but the direnv command is not installed." - echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html" -fi - -mkdir -p "$DEVENV_STATE" -if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile" ] -then - ln -snf /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile "$DEVENV_DOTFILE/profile" -fi -unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps - -mkdir -p /run/user/1000/devenv-3f21a4e -ln -snf /run/user/1000/devenv-3f21a4e /home/user01/Projects/score-system/.devenv/run - - - -# Check whether the direnv integration is out of date. -{ - if [[ ":${DIRENV_ACTIVE-}:" == *":/home/user01/Projects/score-system:"* ]]; then - if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then - if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then - direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "") - - echo "✨ The direnv integration in your .envrc is out of date." - echo "" - echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. " - if [[ -n "$direnv_line" ]]; then - echo "To enable this feature, replace the following line in your .envrc:" - echo "" - echo " $direnv_line" - echo "" - echo "with:" - echo "" - echo " eval \"\$(devenv direnvrc)\"" - else - echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:" - echo "" - echo " eval \"$(devenv direnvrc)\"" - fi - echo "" - echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/." - echo "" - echo "To disable this message:" - echo "" - echo " Add the following environment to your .envrc before \`use devenv\`:" - echo "" - echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1" - echo "" - echo " Or set the following option in your devenv configuration:" - echo "" - echo " devenv.warnOnNewVersion = false;" - echo "" - fi - fi - fi -} >&2 - -' -export shellHook -declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) -depsBuildBuildPropagated='' -export depsBuildBuildPropagated -declare -a pkgsBuildHost=('/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev' '/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9' '/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3' '/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0' '/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13' '/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2' '/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' '/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2' '/nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' '/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46' ) -NIX_CC='/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -export NIX_CC -LINENO='79' -buildPhase='{ echo "------------------------------------------------------------"; - echo " WARNING: the existence of this path is not guaranteed."; - echo " It is an internal implementation detail for pkgs.mkShell."; - echo "------------------------------------------------------------"; - echo; - # Record all build inputs as runtime dependencies - export; -} >> "$out" -' -export buildPhase -PATH='/nix/store/cgjr3kj3hs7ngznyws5qfg16c8scpys0-bash-interactive-5.3p9/bin:/nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3/bin:/nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0/bin:/nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13/bin:/nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2/bin:/nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2/bin:/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2/bin:/nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0/bin:/nix/store/qxaq7jz61a6zkr2mq49i0zvqip2m2jj8-gcc-15.2.0/bin:/nix/store/bsh7n2nx8ndmm1mmww6v2h4851nalj13-glibc-2.42-61-bin/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/mbyy19mdwnfvfwmdi0gqgggx0njvpl1w-binutils-wrapper-2.46/bin:/nix/store/s2946bl9ciwzhafd66jhansrmxq9xhqm-binutils-2.46/bin:/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export PATH -declare -a preConfigureHooks=('_multioutConfig' ) -NIX_STORE='/nix/store' -export NIX_STORE -CC='gcc' -export CC -phases='buildPhase' -export phases -declare -a pkgsBuildTarget=() -NIX_NO_SELF_RPATH='1' -DEVENV_TASKS='' -export DEVENV_TASKS -DEVENV_TASK_FILE='/nix/store/gj888l55lxj0brzhkjrdcald7zw7pskj-tasks.json' -export DEVENV_TASK_FILE -HOSTTYPE='x86_64' -OSTYPE='linux-gnu' -OPTERR='1' -outputLib='out' -PKG_CONFIG='pkg-config' -export PKG_CONFIG -PKG_CONFIG_PATH='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev/lib/pkgconfig' -export PKG_CONFIG_PATH -defaultBuildInputs='' -defaultNativeBuildInputs='/nix/store/ilblcn1dkvzghcr2yk3av6jxn5rk1iqw-patchelf-0.15.2 /nix/store/xknj6c33cc197s60ry0i69vdkmaizrs1-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/788mx070y81zjlg5ipcl0cra3afviw9k-gcc-wrapper-15.2.0' -doCheck='' -export doCheck -RANLIB='ranlib' -export RANLIB -declare -a envBuildTargetHooks=() -declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) -mesonFlags='' -export mesonFlags -outputInfo='out' -declare -a envBuildHostHooks=() -declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) -declare -a pkgsTargetTarget=() -strictDeps='' -export strictDeps -configureFlags='' -export configureFlags -NIX_ENFORCE_NO_NATIVE='1' -export NIX_ENFORCE_NO_NATIVE -depsBuildTarget='' -export depsBuildTarget -depsBuildTargetPropagated='' -export depsBuildTargetPropagated -outputDev='out' -declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) -OBJDUMP='objdump' -export OBJDUMP -NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningfast pic relro stackclashprotection stackprotector strictflexarrays1 strictoverflow zerocallusedregs' -export NIX_HARDENING_ENABLE -SOURCE_DATE_EPOCH='315532800' -export SOURCE_DATE_EPOCH -OLDPWD='' -export OLDPWD -system='x86_64-linux' -export system -STRIP='strip' -export STRIP -NIX_BUILD_CORES='4' -export NIX_BUILD_CORES -DEVENV_STATE='/home/user01/Projects/score-system/.devenv/state' -export DEVENV_STATE -outputInclude='out' -declare -a pkgsHostHost=() -propagatedBuildInputs='' -export propagatedBuildInputs -dontAddDisableDepTrack='1' -export dontAddDisableDepTrack -HOST_PATH='/nix/store/9ypz3flqsrl5xl495mm8h645gadjsxi1-coreutils-9.11/bin:/nix/store/c1cjgg6p8m8fssivzrc2p13mwwml3p3v-findutils-4.10.0/bin:/nix/store/ww555mznia5v7sz2w85lblg4amvhkhv1-diffutils-3.12/bin:/nix/store/kgxafhycw2kybbqih759ykc2043qyi5j-gnused-4.9/bin:/nix/store/gn94gpcp5q08x4v6g8mvw8v4r65rcjzk-gnugrep-3.12/bin:/nix/store/wp1cshqv98i8abs8rcx91s54igqgll0f-gawk-5.4.0/bin:/nix/store/k5akwnrn9x2afaj2va7g4a2zpdim8l43-gnutar-1.35/bin:/nix/store/ndpbjk6jhw0da5h272dqqnyxa35a9gmx-gzip-1.14/bin:/nix/store/3y3kzc5njlj7nwj1s78am0yzjnpicv9x-bzip2-1.0.8-bin/bin:/nix/store/vlq7nnw39j7rwk0pp68w1fcwzpxahm9h-gnumake-4.4.1/bin:/nix/store/gik3rh1vz2jlgnifb9dh6vc6sxwwz9jj-bash-5.3p9/bin:/nix/store/wgvplwp0faqhqr92w0ma8bxaxk202ama-patch-2.8/bin:/nix/store/csra6zhdjw7rjzv98fycz7qjalyv55k2-xz-5.8.3-bin/bin:/nix/store/kyz3mm5snbb8998kbkm28jps1phk9509-file-5.47/bin' -export HOST_PATH -AR='ar' -export AR -_substituteStream_has_warned_replace_deprecation='false' -outputs='out' -export outputs -depsHostHostPropagated='' -export depsHostHostPropagated -AS='as' -export AS -nativeBuildInputs='/nix/store/bvsy09r85z0q1m30p87s1bf4ikb0s84i-bash-interactive-5.3p9-dev /nix/store/1njx7nq9qkcslk0qaririipi1qpdv7vx-typescript-5.9.3 /nix/store/0fm002iw8wq367lmwp520ml62ag5pq56-typescript-language-server-5.3.0 /nix/store/z1cxjx705fswwjjns0sw2ysbd5jqxfgm-bun-1.3.13 /nix/store/gq0svahwy1bvlfz07kimykr6qlalcjz5-eslint_d-15.0.2 /nix/store/1m05k7xgfnw6jc21xxk5681ni3ar97wf-pkg-config-wrapper-0.29.2' -export nativeBuildInputs -declare -a unpackCmdHooks=('_defaultUnpack' ) -DEVSHELL_NAME='󰏖 devenv/#fab387| Bun/yellow' -export DEVSHELL_NAME -LD='ld' -export LD -declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) -concatStringsSep () -{ - - local sep="$1"; - local name="$2"; - local type oldifs; - if type=$(declare -p "$name" 2> /dev/null); then - local -n nameref="$name"; - case "${type#* }" in - -A*) - echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; - return 1 - ;; - -a*) - local IFS="$(printf '\036')" - ;; - *) - local IFS=" " - ;; - esac; - local ifs_separated="${nameref[*]}"; - echo -n "${ifs_separated//"$IFS"/"$sep"}"; - fi -} -distPhase () -{ - - runHook preDist; - local flagsArray=(); - concatTo flagsArray distFlags distFlagsArray distTarget=dist; - echo 'dist flags: %q' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs"; - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; - fi; - runHook postDist -} -_assignFirst () -{ - - local varName="$1"; - local _var; - local REMOVE=REMOVE; - shift; - for _var in "$@"; - do - if [ -n "${!_var-}" ]; then - eval "${varName}"="${_var}"; - return; - fi; - done; - echo; - echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; - echo " The following variables were all unset or empty:"; - echo " $*"; - if [ -z "${out:-}" ]; then - echo ' If you do not want an "out" output in your derivation, make sure to define'; - echo ' the other specific required outputs. This can be achieved by picking one'; - echo " of the above as an output."; - echo ' You do not have to remove "out" if you want to have a different default'; - echo ' output, because the first output is taken as a default.'; - echo; - fi; - return 1 -} -_makeSymlinksRelative () -{ - - local prefixes; - prefixes=(); - for output in $(getAllOutputNames); - do - [ ! -e "${!output}" ] && continue; - prefixes+=("${!output}"); - done; - find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c ' - output="$1" - link="$2" - - linkTarget=$(readlink "$link") - - # only touch links that point inside the same output tree - [[ $linkTarget == "$output"/* ]] || exit 0 - - if [ ! -e "$linkTarget" ]; then - echo "the symlink $link is broken, it points to $linkTarget (which is missing)" - fi - - echo "making symlink relative: $link" - ln -snrf "$linkTarget" "$link" - ' _ -} -concatTo () -{ - - local -; - set -o noglob; - local -n targetref="$1"; - shift; - local arg default name type; - for arg in "$@"; - do - IFS="=" read -r name default <<< "$arg"; - local -n nameref="$name"; - if [[ -z "${nameref[*]}" && -n "$default" ]]; then - targetref+=("$default"); - else - if type=$(declare -p "$name" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; - return 1 - ;; - -a*) - targetref+=("${nameref[@]}") - ;; - *) - if [[ "$name" = *"Array" ]]; then - nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; - targetref+=(${nameref+"${nameref[@]}"}); - else - targetref+=(${nameref-}); - fi - ;; - esac; - fi; - fi; - done -} -findInputs () -{ - - local -r pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - local varVar="${pkgAccumVarVars[hostOffset + 1]}"; - local varRef="$varVar[$((targetOffset - hostOffset))]"; - local var="${!varRef}"; - unset -v varVar varRef; - local varSlice="$var[*]"; - case " ${!varSlice-} " in - *" $pkg "*) - return 0 - ;; - esac; - unset -v varSlice; - eval "$var"'+=("$pkg")'; - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" 1>&2; - exit 1; - fi; - function mapOffset () - { - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi - }; - local relHostOffset; - for relHostOffset in "${allPlatOffsets[@]}"; - do - local files="${propagatedDepFilesVars[relHostOffset + 1]}"; - local hostOffsetNext; - mapOffset "$relHostOffset" hostOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - local relTargetOffset; - for relTargetOffset in "${allPlatOffsets[@]}"; - do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue; - local fileRef="${files}[$relTargetOffset - $relHostOffset]"; - local file="${!fileRef}"; - unset -v fileRef; - local targetOffsetNext; - mapOffset "$relTargetOffset" targetOffsetNext; - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; - [[ -f "$pkg/nix-support/$file" ]] || continue; - local pkgNext; - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; - for pkgNext in $pkgNext; - do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; - done; - done; - done -} -getAllOutputNames () -{ - - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}"; - else - echo "$outputs"; - fi -} -ccWrapper_addCVars () -{ - - local role_post; - getHostRoleEnvHook; - local found=; - if [ -d "$1/include" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; - found=1; - fi; - if [ -d "$1/Library/Frameworks" ]; then - export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; - found=1; - fi; - if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then - local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}"; - export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed"; - fi -} -patchPhase () -{ - - runHook prePatch; - local -a patchesArray; - concatTo patchesArray patches; - local -a flagsArray; - concatTo flagsArray patchFlags=-p1; - for i in "${patchesArray[@]}"; - do - echo "applying patch $i"; - local uncompress=cat; - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac; - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; - done; - runHook postPatch -} -_addToEnv () -{ - - local depHostOffset depTargetOffset; - local pkg; - for depHostOffset in "${allPlatOffsets[@]}"; - do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; - for depTargetOffset in "${allPlatOffsets[@]}"; - do - (( depHostOffset <= depTargetOffset )) || continue; - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; - if [[ -z "${strictDeps-}" ]]; then - local visitedPkgs=""; - for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue; - fi; - runHook "${!hookRef}" "$pkg"; - visitedPkgs+=" $pkg"; - done; - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - runHook "${!hookRef}" "$pkg"; - done; - fi; - done; - done -} -fixLibtool () -{ - - local search_path; - for flag in $NIX_LDFLAGS; - do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac; - done; - sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' -} -echoCmd () -{ - - printf "%s:" "$1"; - shift; - printf ' %q' "$@"; - echo -} -printPhases () -{ - - definePhases; - local phase; - for phase in ${phases[*]}; - do - printf '%s\n' "$phase"; - done -} -auditTmpdir () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "checking for references to $TMPDIR/ in $dir..."; - local tmpdir elf_fifo script_fifo; - tmpdir="$(mktemp -d)"; - elf_fifo="$tmpdir/elf"; - script_fifo="$tmpdir/script"; - mkfifo "$elf_fifo" "$script_fifo"; - ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do - if isELF "$file"; then - printf '%s\0' "$file" 1>&3; - else - if isScript "$file"; then - filename=${file##*/}; - dir=${file%/*}; - if [ -e "$dir/.$filename-wrapped" ]; then - printf '%s\0' "$file" 1>&4; - fi; - fi; - fi; - done; - exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then - echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$elf_fifo" ) & local pid_elf=$!; - local pid_script; - ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c ' - if grep -q -F "$TMPDIR/" "$1"; then - echo "wrapper script $1 contains a forbidden reference to $TMPDIR/" - exit 1 - fi - ' _ < "$script_fifo" ) & local pid_script=$!; - wait "$pid_elf" || { - echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - wait "$pid_script" || { - echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!"; - exit 1 - }; - rm -r "$tmpdir" -} -addToSearchPath () -{ - - addToSearchPathWithCustomDelimiter ":" "$@" -} -fixupPhase () -{ - - local output; - for output in $(getAllOutputNames); - do - if [ -e "${!output}" ]; then - chmod -R u+w,u-s,g-s "${!output}"; - fi; - done; - runHook preFixup; - local output; - for output in $(getAllOutputNames); - do - prefix="${!output}" runHook fixupOutput; - done; - recordPropagatedDependencies; - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; - fi; - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support"; - local hook; - for hook in ${setupHooks[@]}; - do - local content; - consumeEntire content < "$hook"; - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; - unset -v content; - done; - unset -v hook; - fi; - if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then - mkdir -p "${!outputBin}/nix-support"; - printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; - fi; - runHook postFixup -} -printWords () -{ - - (( "$#" > 0 )) || return 0; - printf '%s ' "$@" -} -nixErrorLog () -{ - - _nixLogWithLevel 0 "$*" -} -runOneHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook ret=1; - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - if _eval "$hook" "$@"; then - ret=0; - break; - fi; - done; - return "$ret" -} -runPhase () -{ - - local curPhase="$*"; - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then - return; - fi; - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then - return; - fi; - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then - return; - fi; - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then - return; - fi; - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then - return; - fi; - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then - return; - fi; - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then - return; - fi; - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then - return; - fi; - showPhaseHeader "$curPhase"; - dumpVars; - local startTime endTime; - startTime=$(date +"%s"); - eval "${!curPhase:-$curPhase}"; - endTime=$(date +"%s"); - showPhaseFooter "$curPhase" "$startTime" "$endTime"; - if [ "$curPhase" = unpackPhase ]; then - [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; - cd -- "${sourceRoot:-.}"; - fi -} -stripDirs () -{ - - local cmd="$1"; - local ranlibCmd="$2"; - local paths="$3"; - local stripFlags="$4"; - local excludeFlags=(); - local pathsNew=; - [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; - [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; - local pattern; - if [ -n "${stripExclude:-}" ]; then - for pattern in "${stripExclude[@]}"; - do - excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); - done; - fi; - local p; - for p in ${paths}; - do - if [ -e "$prefix/$p" ]; then - pathsNew="${pathsNew} $prefix/$p"; - fi; - done; - paths=${pathsNew}; - if [ -n "${paths}" ]; then - echo "stripping (with command $cmd and flags $stripFlags) in $paths"; - local striperr; - striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; - find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; - [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); - rm "$striperr"; - find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; - fi -} -_multioutDevs () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then - return; - fi; - moveToOutput include "${!outputInclude}"; - moveToOutput lib/pkgconfig "${!outputDev}"; - moveToOutput share/pkgconfig "${!outputDev}"; - moveToOutput lib/cmake "${!outputDev}"; - moveToOutput share/aclocal "${!outputDev}"; - for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; - do - echo "Patching '$f' includedir to output ${!outputInclude}"; - sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; - done -} -_multioutPropagateDev () -{ - - if [ "$(getAllOutputNames)" = "out" ]; then - return; - fi; - local outputFirst; - for outputFirst in $(getAllOutputNames); - do - break; - done; - local propagaterOutput="$outputDev"; - if [ -z "$propagaterOutput" ]; then - propagaterOutput="$outputFirst"; - fi; - if [ -z "${propagatedBuildOutputs+1}" ]; then - local po_dirty="$outputBin $outputInclude $outputLib"; - set +o pipefail; - propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; - set -o pipefail; - fi; - if [ -z "$propagatedBuildOutputs" ]; then - return; - fi; - mkdir -p "${!propagaterOutput}"/nix-support; - for output in $propagatedBuildOutputs; - do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; - done -} -substituteAllStream () -{ - - local -a args=(); - _allFlags; - substituteStream "$1" "$2" "${args[@]}" -} -getHostRole () -{ - - getRole "$hostOffset" -} -_multioutConfig () -{ - - if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then - return; - fi; - if [ -z "${shareDocName:-}" ]; then - local confScript="${configureScript:-}"; - if [ -z "$confScript" ] && [ -x ./configure ]; then - confScript=./configure; - fi; - if [ -f "$confScript" ]; then - local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; - fi; - if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then - shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; - fi; - fi; - prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; - prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal -} -showPhaseFooter () -{ - - local phase="$1"; - local startTime="$2"; - local endTime="$3"; - local delta=$(( endTime - startTime )); - (( delta < 30 )) && return; - local H=$((delta/3600)); - local M=$((delta%3600/60)); - local S=$((delta%60)); - echo -n "$phase completed in "; - (( H > 0 )) && echo -n "$H hours "; - (( M > 0 )) && echo -n "$M minutes "; - echo "$S seconds" -} -_addRpathPrefix () -{ - - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; - fi -} -_moveLib64 () -{ - - if [ "${dontMoveLib64-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then - return; - fi; - echo "moving $prefix/lib64/* to $prefix/lib"; - mkdir -p $prefix/lib; - shopt -s dotglob; - for i in $prefix/lib64/*; - do - mv --no-clobber "$i" $prefix/lib; - done; - shopt -u dotglob; - rmdir $prefix/lib64; - ln -s lib $prefix/lib64 -} -substituteAllInPlace () -{ - - local fileName="$1"; - shift; - substituteAll "$fileName" "$fileName" "$@" -} -installCheckPhase () -{ - - runHook preInstallCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing"; - else - if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; - echoCmd 'installcheck flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - fi; - runHook postInstallCheck -} -configurePhase () -{ - - runHook preConfigure; - : "${configureScript=}"; - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure; - fi; - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; - local i; - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i"; - fixLibtool "$i"; - done; - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); - find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; - rm -f "$CONFIGURE_MTIME_REFERENCE"; - fi; - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - local -r prefixKeyOrDefault="${prefixKey:---prefix=}"; - if [ "${prefixKeyOrDefault: -1}" = " " ]; then - prependToVar configureFlags "$prefix"; - prependToVar configureFlags "${prefixKeyOrDefault::-1}"; - else - prependToVar configureFlags "$prefixKeyOrDefault$prefix"; - fi; - fi; - if [[ -f "$configureScript" ]]; then - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking; - fi; - fi; - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static; - fi; - fi; - if [ -z "${dontPatchShebangsInConfigure:-}" ]; then - patchShebangs --build "$configureScript"; - fi; - fi; - if [ -n "$configureScript" ]; then - local -a flagsArray; - concatTo flagsArray configureFlags configureFlagsArray; - echoCmd 'configure flags' "${flagsArray[@]}"; - $configureScript "${flagsArray[@]}"; - unset flagsArray; - else - echo "no configure script, doing nothing"; - fi; - runHook postConfigure -} -_callImplicitHook () -{ - - local def="$1"; - local hookName="$2"; - if declare -F "$hookName" > /dev/null; then - nixTalkativeLog "calling implicit '$hookName' function hook"; - "$hookName"; - else - if type -p "$hookName" > /dev/null; then - nixTalkativeLog "sourcing implicit '$hookName' script hook"; - source "$hookName"; - else - if [ -n "${!hookName:-}" ]; then - nixTalkativeLog "evaling implicit '$hookName' string hook"; - eval "${!hookName}"; - else - return "$def"; - fi; - fi; - fi -} -moveToOutput () -{ - - local patt="$1"; - local dstOut="$2"; - local output; - for output in $(getAllOutputNames); - do - if [ "${!output}" = "$dstOut" ]; then - continue; - fi; - local srcPath; - for srcPath in "${!output}"/$patt; - do - if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then - continue; - fi; - if [ "$dstOut" = REMOVE ]; then - echo "Removing $srcPath"; - rm -r "$srcPath"; - else - local dstPath="$dstOut${srcPath#${!output}}"; - echo "Moving $srcPath to $dstPath"; - if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then - rmdir "$srcPath" --ignore-fail-on-non-empty; - if [ -d "$srcPath" ]; then - mv -t "$dstPath" "$srcPath"/*; - rmdir "$srcPath"; - fi; - else - mkdir -p "$(readlink -m "$dstPath/..")"; - mv "$srcPath" "$dstPath"; - fi; - fi; - local srcParent="$(readlink -m "$srcPath/..")"; - if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then - echo "Removing empty $srcParent/ and (possibly) its parents"; - rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; - fi; - done; - done -} -substituteInPlace () -{ - - local -a fileNames=(); - for arg in "$@"; - do - if [[ "$arg" = "--"* ]]; then - break; - fi; - fileNames+=("$arg"); - shift; - done; - if ! [[ "${#fileNames[@]}" -gt 0 ]]; then - echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; - return 1; - fi; - for file in "${fileNames[@]}"; - do - substitute "$file" "$file" "$@"; - done -} -definePhases () -{ - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi -} -_pruneLibtoolFiles () -{ - - if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then - return; - fi; - find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; -} -_moveSystemdUserUnits () -{ - - if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then - return; - fi; - if [ ! -e "${prefix:?}/lib/systemd/user" ]; then - return; - fi; - local source="$prefix/lib/systemd/user"; - local target="$prefix/share/systemd/user"; - echo "moving $source/* to $target"; - mkdir -p "$target"; - ( shopt -s dotglob; - for i in "$source"/*; - do - mv "$i" "$target"; - done ); - rmdir "$source"; - ln -s "$target" "$source" -} -activatePackage () -{ - - local pkg="$1"; - local -r hostOffset="$2"; - local -r targetOffset="$3"; - (( hostOffset <= targetOffset )) || exit 1; - if [ -f "$pkg" ]; then - nixTalkativeLog "sourcing setup hook '$pkg'"; - source "$pkg"; - fi; - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin"; - fi; - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share"; - fi; - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin"; - fi; - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; - source "$pkg/nix-support/setup-hook"; - fi -} -getTargetRole () -{ - - getRole "$targetOffset" -} -getHostRoleEnvHook () -{ - - getRole "$depHostOffset" -} -mapOffset () -{ - - local -r inputOffset="$1"; - local -n outputOffset="$2"; - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)); - else - outputOffset=$((inputOffset - 1 + targetOffset)); - fi -} -stripHash () -{ - - local strippedName casematchOpt=0; - strippedName="$(basename -- "$1")"; - shopt -q nocasematch && casematchOpt=1; - shopt -u nocasematch; - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}"; - else - echo "$strippedName"; - fi; - if (( casematchOpt )); then - shopt -s nocasematch; - fi -} -_moveToShare () -{ - - if [ -n "$__structuredAttrs" ]; then - if [ -z "${forceShare-}" ]; then - forceShare=(man doc info); - fi; - else - forceShare=(${forceShare:-man doc info}); - fi; - if [[ -z "$out" ]]; then - return; - fi; - for d in "${forceShare[@]}"; - do - if [ -d "$out/$d" ]; then - if [ -d "$out/share/$d" ]; then - echo "both $d/ and share/$d/ exist!"; - else - echo "moving $out/$d to $out/share/$d"; - mkdir -p $out/share; - mv $out/$d $out/share/; - fi; - fi; - done -} -runHook () -{ - - local hookName="$1"; - shift; - local hooksSlice="${hookName%Hook}Hooks[@]"; - local hook; - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; - do - _logHook "$hookName" "$hook" "$@"; - _eval "$hook" "$@"; - done; - return 0 -} -checkPhase () -{ - - runHook preCheck; - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing"; - runHook postCheck; - return; - fi; - if [[ -z "${checkTarget:-}" ]]; then - if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then - checkTarget="check"; - else - if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then - checkTarget="test"; - fi; - fi; - fi; - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing"; - else - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; - echoCmd 'check flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postCheck -} -_nixLogWithLevel () -{ - - [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; - local logLevel; - case "${1:?}" in - 0) - logLevel=ERROR - ;; - 1) - logLevel=WARN - ;; - 2) - logLevel=NOTICE - ;; - 3) - logLevel=INFO - ;; - 4) - logLevel=TALKATIVE - ;; - 5) - logLevel=CHATTY - ;; - 6) - logLevel=DEBUG - ;; - 7) - logLevel=VOMIT - ;; - *) - echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; - return 1 - ;; - esac; - local callerName="${FUNCNAME[2]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" -} -nixLog () -{ - - [[ -z ${NIX_LOG_FD-} ]] && return 0; - local callerName="${FUNCNAME[1]}"; - if [[ $callerName == "_callImplicitHook" ]]; then - callerName="${hookName:?}"; - fi; - printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" -} -_updateSourceDateEpochFromSourceRoot () -{ - - if [ -n "$sourceRoot" ]; then - updateSourceDateEpoch "$sourceRoot"; - fi -} -buildPhase () -{ - - runHook preBuild; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing"; - else - foundMakefile=1; - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; - echoCmd 'build flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - fi; - runHook postBuild -} -appendToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=(${nameref+"${nameref[@]}"} "$@"); - else - nameref="${nameref-} $*"; - fi -} -bintoolsWrapper_addLDVars () -{ - - local role_post; - getHostRoleEnvHook; - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; - fi; - if [[ -d "$1/lib" ]]; then - local -a glob=($1/lib/lib*); - if [ "${#glob[*]}" -gt 0 ]; then - export NIX_LDFLAGS${role_post}+=" -L$1/lib"; - fi; - fi -} -_activatePkgs () -{ - - local hostOffset targetOffset; - local pkg; - for hostOffset in "${allPlatOffsets[@]}"; - do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; - for targetOffset in "${allPlatOffsets[@]}"; - do - (( hostOffset <= targetOffset )) || continue; - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; - local pkgsSlice="${!pkgsRef}[@]"; - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; - do - activatePackage "$pkg" "$hostOffset" "$targetOffset"; - done; - done; - done -} -nixInfoLog () -{ - - _nixLogWithLevel 3 "$*" -} -showPhaseHeader () -{ - - local phase="$1"; - echo "Running phase: $phase"; - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" -} -_multioutDocs () -{ - - local REMOVE=REMOVE; - moveToOutput share/info "${!outputInfo}"; - moveToOutput share/doc "${!outputDoc}"; - moveToOutput share/gtk-doc "${!outputDevdoc}"; - moveToOutput share/devhelp/books "${!outputDevdoc}"; - moveToOutput share/man "${!outputMan}"; - moveToOutput share/man/man3 "${!outputDevman}" -} -substitute () -{ - - local input="$1"; - local output="$2"; - shift 2; - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" 1>&2; - return 1; - fi; - local content; - consumeEntire content < "$input"; - if [ -e "$output" ]; then - chmod +w "$output"; - fi; - substituteStream content "file '$input'" "$@" > "$output" -} -updateAutotoolsGnuConfigScriptsPhase () -{ - - if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then - return; - fi; - for script in config.sub config.guess; - do - for f in $(find . -type f -name "$script"); - do - echo "Updating Autotools / GNU config script to a newer upstream version: $f"; - cp -f "/nix/store/zmvllxxx62iys7vpyg020rni3v29bcxi-gnu-config-2024-01-01/$script" "$f"; - done; - done -} -installPhase () -{ - - runHook preInstall; - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing"; - runHook postInstall; - return; - else - foundMakefile=1; - fi; - if [ -n "$prefix" ]; then - mkdir -p "$prefix"; - fi; - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); - concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; - echoCmd 'install flags' "${flagsArray[@]}"; - make ${makefile:+-f $makefile} "${flagsArray[@]}"; - unset flagsArray; - runHook postInstall -} -updateSourceDateEpoch () -{ - - local path="$1"; - [[ $path == -* ]] && path="./$path"; - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); - local time="${res[0]//\.[0-9]*/}"; - local newestFile="${res[1]}"; - if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then - echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; - export SOURCE_DATE_EPOCH="$time"; - local now="$(date +%s)"; - if [ "$time" -gt $((now - 60)) ]; then - echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; - fi; - fi -} -prependToVar () -{ - - local -n nameref="$1"; - local useArray type; - if [ -n "$__structuredAttrs" ]; then - useArray=true; - else - useArray=false; - fi; - if type=$(declare -p "$1" 2> /dev/null); then - case "${type#* }" in - -A*) - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; - return 1 - ;; - -a*) - useArray=true - ;; - *) - useArray=false - ;; - esac; - fi; - shift; - if $useArray; then - nameref=("$@" ${nameref+"${nameref[@]}"}); - else - nameref="$* ${nameref-}"; - fi -} -substituteStream () -{ - - local var=$1; - local description=$2; - shift 2; - while (( "$#" )); do - local replace_mode="$1"; - case "$1" in - --replace) - if ! "$_substituteStream_has_warned_replace_deprecation"; then - echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; - _substituteStream_has_warned_replace_deprecation=true; - fi; - replace_mode='--replace-warn' - ;& - --replace-quiet | --replace-warn | --replace-fail) - pattern="$2"; - replacement="$3"; - shift 3; - if ! [[ "${!var}" == *"$pattern"* ]]; then - if [ "$replace_mode" == --replace-warn ]; then - printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - else - if [ "$replace_mode" == --replace-fail ]; then - printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; - return 1; - fi; - fi; - fi; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var) - local varName="$2"; - shift 2; - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; - return 1; - fi; - if [ -z ${!varName+x} ]; then - echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; - return 1; - fi; - pattern="@$varName@"; - replacement="${!varName}"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - --subst-var-by) - pattern="@$2@"; - replacement="$3"; - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; - shift 3 - ;; - *) - echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; - return 1 - ;; - esac; - done; - printf "%s" "${!var}" -} -noBrokenSymlinks () -{ - - local -r output="${1:?}"; - local path; - local pathParent; - local symlinkTarget; - local -i numDanglingSymlinks=0; - local -i numReflexiveSymlinks=0; - local -i numUnreadableSymlinks=0; - if [[ ! -e $output ]]; then - nixWarnLog "skipping non-existent output $output"; - return 0; - fi; - nixInfoLog "running on $output"; - while IFS= read -r -d '' path; do - pathParent="$(dirname "$path")"; - if ! symlinkTarget="$(readlink "$path")"; then - nixErrorLog "the symlink $path is unreadable"; - numUnreadableSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget == /* ]]; then - nixInfoLog "symlink $path points to absolute target $symlinkTarget"; - else - nixInfoLog "symlink $path points to relative target $symlinkTarget"; - symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; - fi; - if [[ $symlinkTarget = "$TMPDIR"/* ]]; then - nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget"; - numDanglingSymlinks+=1; - continue; - fi; - if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then - nixInfoLog "symlink $path points outside the Nix store; ignoring"; - continue; - fi; - if [[ $path == "$symlinkTarget" ]]; then - nixErrorLog "the symlink $path is reflexive"; - numReflexiveSymlinks+=1; - else - if [[ ! -e $symlinkTarget ]]; then - nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; - numDanglingSymlinks+=1; - else - nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; - fi; - fi; - done < <(find "$output" -type l -print0); - if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then - nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; - exit 1; - fi; - return 0 -} -_logHook () -{ - - if [[ -z ${NIX_LOG_FD-} ]]; then - return; - fi; - local hookKind="$1"; - local hookExpr="$2"; - shift 2; - if declare -F "$hookExpr" > /dev/null 2>&1; then - nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; - else - if type -p "$hookExpr" > /dev/null; then - nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; - else - if [[ "$hookExpr" != "_callImplicitHook"* ]]; then - local exprToOutput; - if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then - exprToOutput="$hookExpr"; - else - local hookExprLine; - while IFS= read -r hookExprLine; do - hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; - if [[ -n "$hookExprLine" ]]; then - exprToOutput+="$hookExprLine\\n "; - fi; - done <<< "$hookExpr"; - exprToOutput="${exprToOutput%%\\n }"; - fi; - nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; - fi; - fi; - fi -} -unpackFile () -{ - - curSrc="$1"; - echo "unpacking source archive $curSrc"; - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc"; - exit 1; - fi -} -patchShebangsAuto () -{ - - if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then - if [[ "$output" != out && "$output" = "$outputDev" ]]; then - patchShebangs --build "$prefix"; - else - patchShebangs --host "$prefix"; - fi; - fi -} -_eval () -{ - - if declare -F "$1" > /dev/null 2>&1; then - "$@"; - else - eval "$1"; - fi -} -substituteAll () -{ - - local input="$1"; - local output="$2"; - local -a args=(); - _allFlags; - substitute "$input" "$output" "${args[@]}" -} -_doStrip () -{ - - local -ra flags=(dontStripHost dontStripTarget); - local -ra debugDirs=(stripDebugList stripDebugListTarget); - local -ra allDirs=(stripAllList stripAllListTarget); - local -ra stripCmds=(STRIP STRIP_FOR_TARGET); - local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; - stripDebugListTarget=${stripDebugListTarget[*]:-}; - stripAllList=${stripAllList[*]:-}; - stripAllListTarget=${stripAllListTarget[*]:-}; - local i; - for i in ${!stripCmds[@]}; - do - local -n flag="${flags[$i]}"; - local -n debugDirList="${debugDirs[$i]}"; - local -n allDirList="${allDirs[$i]}"; - local -n stripCmd="${stripCmds[$i]}"; - local -n ranlibCmd="${ranlibCmds[$i]}"; - if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then - continue; - fi; - stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; - stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; - done -} -_moveSbin () -{ - - if [ "${dontMoveSbin-}" = 1 ]; then - return; - fi; - if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then - return; - fi; - echo "moving $prefix/sbin/* to $prefix/bin"; - mkdir -p $prefix/bin; - shopt -s dotglob; - for i in $prefix/sbin/*; - do - mv "$i" $prefix/bin; - done; - shopt -u dotglob; - rmdir $prefix/sbin; - ln -s bin $prefix/sbin -} -_overrideFirst () -{ - - if [ -z "${!1-}" ]; then - _assignFirst "$@"; - fi -} -consumeEntire () -{ - - if IFS='' read -r -d '' "$1"; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; - return 1; - fi -} -exitHandler () -{ - - exitCode="$?"; - set +e; - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times); - echo "build times:"; - echo "user time for the shell ${buildTimes[0]}"; - echo "system time for the shell ${buildTimes[1]}"; - echo "user time for all child processes ${buildTimes[2]}"; - echo "system time for all child processes ${buildTimes[3]}"; - fi; - if (( "$exitCode" != 0 )); then - runHook failureHook; - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)"; - mkdir -p "$out/nix-support"; - printf "%s" "$exitCode" > "$out/nix-support/failed"; - exit 0; - fi; - else - runHook exitHook; - fi; - return "$exitCode" -} -genericBuild () -{ - - export GZIP_NO_TIMESTAMPS=1; - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath"; - return; - fi; - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand"; - return; - fi; - definePhases; - for curPhase in ${phases[*]}; - do - runPhase "$curPhase"; - done -} -addToSearchPathWithCustomDelimiter () -{ - - local delimiter="$1"; - local varName="$2"; - local dir="$3"; - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; - fi -} -nixVomitLog () -{ - - _nixLogWithLevel 7 "$*" -} -recordPropagatedDependencies () -{ - - declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); - declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); - local propagatedInputsIndex; - for propagatedInputsIndex in "${!flatVars[@]}"; - do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; - [[ -n "${!propagatedInputsSlice}" ]] || continue; - mkdir -p "${!outputDev}/nix-support"; - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; - done -} -compressManPages () -{ - - local dir="$1"; - if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then - return; - fi; - echo "gzipping man pages under $dir/share/man/"; - find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f; - find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do - local target; - target="$(readlink -f "$f")"; - if [ -f "$target".gz ]; then - ln -sf "$target".gz "$f".gz && rm "$f"; - fi; - done -} -unpackPhase () -{ - - runHook preUnpack; - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - echo 'variable $src or $srcs should point to the source'; - exit 1; - fi; - srcs="$src"; - fi; - local -a srcsArray; - concatTo srcsArray srcs; - local dirsBefore=""; - for i in *; - do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i "; - fi; - done; - for i in "${srcsArray[@]}"; - do - unpackFile "$i"; - done; - : "${sourceRoot=}"; - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot; - else - if [ -z "$sourceRoot" ]; then - for i in *; - do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories"; - exit 1; - fi; - sourceRoot="$i" - ;; - esac; - fi; - done; - fi; - fi; - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories"; - exit 1; - fi; - echo "source root is $sourceRoot"; - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot"; - fi; - runHook postUnpack -} -getTargetRoleWrapper () -{ - - case $targetOffset in - -1) - export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 - ;; - 0) - export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 - ;; - 1) - export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -getTargetRoleEnvHook () -{ - - getRole "$depTargetOffset" -} -_allFlags () -{ - - export system pname name version; - while IFS='' read -r varName; do - nixTalkativeLog "@${varName}@ -> ${!varName}"; - args+=("--subst-var" "$varName"); - done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') -} -pkgConfigWrapper_addPkgConfigPath () -{ - - local role_post; - getHostRoleEnvHook; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; - addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" -} -printLines () -{ - - (( "$#" > 0 )) || return 0; - printf '%s\n' "$@" -} -patchShebangs () -{ - - local pathName; - local update=false; - while [[ $# -gt 0 ]]; do - case "$1" in - --host) - pathName=HOST_PATH; - shift - ;; - --build) - pathName=PATH; - shift - ;; - --update) - update=true; - shift - ;; - --) - shift; - break - ;; - -* | --*) - echo "Unknown option $1 supplied to patchShebangs" 1>&2; - return 1 - ;; - *) - break - ;; - esac; - done; - echo "patching script interpreter paths in $@"; - local f; - local oldPath; - local newPath; - local arg0; - local args; - local oldInterpreterLine; - local newInterpreterLine; - if [[ $# -eq 0 ]]; then - echo "No arguments supplied to patchShebangs" 1>&2; - return 0; - fi; - local f; - while IFS= read -r -d '' f; do - isScript "$f" || continue; - read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; - read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; - if [[ -z "${pathName:-}" ]]; then - if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then - pathName=HOST_PATH; - else - pathName=PATH; - fi; - fi; - if [[ "$oldPath" == *"/bin/env" ]]; then - if [[ $arg0 == "-S" ]]; then - arg0=${args%% *}; - [[ "$args" == *" "* ]] && args=${args#* } || args=; - newPath="$(PATH="${!pathName}" type -P "env" || true)"; - args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; - else - if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then - echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; - exit 1; - else - newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; - fi; - fi; - else - if [[ -z $oldPath ]]; then - oldPath="/bin/sh"; - fi; - newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; - args="$arg0 $args"; - fi; - newInterpreterLine="$newPath $args"; - newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; - if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then - if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then - echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; - escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; - timestamp=$(stat --printf "%y" "$f"); - tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX); - sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile"; - local restoreReadOnly; - if [[ ! -w "$f" ]]; then - chmod +w "$f"; - restoreReadOnly=true; - fi; - cat "$tmpFile" > "$f"; - rm "$tmpFile"; - if [[ -n "${restoreReadOnly:-}" ]]; then - chmod -w "$f"; - fi; - touch --date "$timestamp" "$f"; - fi; - fi; - done < <(find "$@" -type f -perm -0100 -print0) -} -nixChattyLog () -{ - - _nixLogWithLevel 5 "$*" -} -patchELF () -{ - - local dir="$1"; - [ -e "$dir" ] || return 0; - echo "shrinking RPATHs of ELF executables and libraries in $dir"; - local i; - while IFS= read -r -d '' i; do - if [[ "$i" =~ .build-id ]]; then - continue; - fi; - if ! isELF "$i"; then - continue; - fi; - echo "shrinking $i"; - patchelf --shrink-rpath "$i" || true; - done < <(find "$dir" -type f -print0) -} -isMachO () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - return 0; - else - if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - return 0; - else - return 1; - fi; - fi; - fi -} -nixDebugLog () -{ - - _nixLogWithLevel 6 "$*" -} -nixNoticeLog () -{ - - _nixLogWithLevel 2 "$*" -} -nixWarnLog () -{ - - _nixLogWithLevel 1 "$*" -} -_defaultUnpack () -{ - - local fn="$1"; - local destination; - if [ -d "$fn" ]; then - destination="$(stripHash "$fn")"; - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!"; - echo "Did you specify two \"srcs\" with the same \"name\"?"; - return 1; - fi; - cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination"; - else - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; - true ) | tar xf - --mode=+w --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - tar xf "$fn" --mode=+w --warning=no-timestamp - ;; - *) - return 1 - ;; - esac; - fi -} -isELF () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 4 -u "$fd" magic; - exec {fd}>&-; - if [ "$magic" = 'ELF' ]; then - return 0; - else - return 1; - fi -} -isScript () -{ - - local fn="$1"; - local fd; - local magic; - exec {fd}< "$fn"; - LANG=C read -r -n 2 -u "$fd" magic; - exec {fd}>&-; - if [[ "$magic" =~ \#! ]]; then - return 0; - else - return 1; - fi -} -noBrokenSymlinksInAllOutputs () -{ - - if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then - for output in $(getAllOutputNames); - do - noBrokenSymlinks "${!output}"; - done; - fi -} -nixTalkativeLog () -{ - - _nixLogWithLevel 4 "$*" -} -getRole () -{ - - case $1 in - -1) - role_post='_FOR_BUILD' - ;; - 0) - role_post='' - ;; - 1) - role_post='_FOR_TARGET' - ;; - *) - echo "binutils-wrapper-2.46: used as improper sort of dependency" 1>&2; - return 1 - ;; - esac -} -dumpVars () -{ - - if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then - local old_umask; - old_umask=$(umask); - umask 0077; - export 2> /dev/null > "$NIX_BUILD_TOP/env-vars"; - umask "$old_umask"; - fi -} -addEnvHooks () -{ - - local depHostOffset="$1"; - shift; - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; - local pkgHookVar; - for pkgHookVar in "${!pkgHookVarsSlice}"; - do - eval "${pkgHookVar}s"'+=("$@")'; - done -} -PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" -XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" - -eval "${shellHook:-}" diff --git a/.devenv/shell-rcfile.sh b/.devenv/shell-rcfile.sh deleted file mode 100644 index f8d243a..0000000 --- a/.devenv/shell-rcfile.sh +++ /dev/null @@ -1,163 +0,0 @@ -# Disable history during init so devenv internal commands don't pollute history. -set +o history - -# Environment diff helpers (always defined for tracking) - -# Environment diff helpers (inspired by direnv) -# Diff is stored in _DEVENV_DIFF env var (not a file) so each shell has its own state -# Uses gzip+base64 encoding for compact storage - -# Variables to ignore in diff (shell internals that change dynamically) -__devenv_ignored_var() { - case "$1" in - _*|PWD|OLDPWD|SHLVL|SHELL|SHELLOPTS|BASHOPTS|BASH_*|HISTCMD|HISTFILE) - return 0 ;; - PS1|PS2|PS3|PS4|PROMPT|PROMPT_COMMAND|PROMPT_DIRTRIM) - return 0 ;; - COMP_*|READLINE_*|MAILCHECK|COLUMNS|LINES|RANDOM|SECONDS|LINENO|EPOCHSECONDS|EPOCHREALTIME|SRANDOM) - return 0 ;; - STARSHIP_*|__fish*|DIRENV_*|nix_saved_*) - return 0 ;; - *) - return 1 ;; - esac -} - -__devenv_capture_env() { - # Capture exported variables using declare -p for proper escaping - declare -p -x 2>/dev/null | LC_ALL=C sort -} - -__devenv_serialize_diff() { - # Serialize diff (stdin) to base64-encoded gzip - gzip -c | base64 -w0 -} - -__devenv_deserialize_diff() { - # Deserialize diff from base64-encoded gzip to stdout - echo "$1" | base64 -d | gzip -d 2>/dev/null -} - -__devenv_compute_diff() { - # Compare before ($1) and current env, return diff via _DEVENV_DIFF env var - local before_file="$1" - - # Create temp files - local after_file diff_content - after_file=$(mktemp) - diff_content=$(mktemp) - __devenv_capture_env > "$after_file" - - # Build associative arrays for before/after - local -A before_vars after_vars - while IFS= read -r line; do - [[ "$line" != declare\ -x\ * ]] && continue - local vardef="${line#declare -x }" - local var="${vardef%%=*}" - [[ -z "$var" ]] && continue - __devenv_ignored_var "$var" && continue - before_vars["$var"]="$line" - done < "$before_file" - - while IFS= read -r line; do - [[ "$line" != declare\ -x\ * ]] && continue - local vardef="${line#declare -x }" - local var="${vardef%%=*}" - [[ -z "$var" ]] && continue - __devenv_ignored_var "$var" && continue - after_vars["$var"]="$line" - done < "$after_file" - - # Find PREV entries (vars that were modified or removed) - for var in "${!before_vars[@]}"; do - if [[ "${after_vars[$var]}" != "${before_vars[$var]}" ]]; then - echo "P:${before_vars[$var]}" >> "$diff_content" - fi - done - - # Find NEXT entries (vars that were added or modified) - for var in "${!after_vars[@]}"; do - if [[ -z "${before_vars[$var]+x}" ]]; then - echo "N:$var" >> "$diff_content" - elif [[ "${after_vars[$var]}" != "${before_vars[$var]}" ]]; then - echo "N:$var" >> "$diff_content" - fi - done - - # Serialize and store in env var - _DEVENV_DIFF=$(__devenv_serialize_diff < "$diff_content") - export _DEVENV_DIFF - - rm -f "$after_file" "$diff_content" -} - -__devenv_apply_reverse_diff() { - # Reverse the diff: restore PREV values, unset NEXT-only vars - [[ -z "$_DEVENV_DIFF" ]] && return - - local -A prev_vars - local diff_content - diff_content=$(__devenv_deserialize_diff "$_DEVENV_DIFF") - - # First pass: collect and restore PREV declarations - while IFS= read -r line; do - if [[ "$line" == P:declare\ * ]]; then - local decl="${line#P:}" - local var="${decl#declare -x }" - var="${var%%=*}" - prev_vars["$var"]=1 - # Use export instead of evaluating the declare statement directly, - # because declare -x inside a function creates a local variable - # in bash 5.0+. - eval "export ${decl#declare -x }" 2>/dev/null - fi - done <<< "$diff_content" - - # Second pass: unset NEXT vars that were not in PREV (added vars) - while IFS= read -r line; do - if [[ "$line" == N:* ]]; then - local var="${line#N:}" - if [[ -z "${prev_vars[$var]+x}" ]]; then - unset "$var" - fi - fi - done <<< "$diff_content" -} - - -# Capture environment BEFORE sourcing devenv (for diff tracking) -_devenv_before_file=$(mktemp) -__devenv_capture_env > "$_devenv_before_file" - -# Source the devenv environment -source "/home/user01/Projects/score-system/.devenv/shell-env.sh" - -# Compute and store the initial diff in _DEVENV_DIFF env var -__devenv_compute_diff "$_devenv_before_file" -rm -f "$_devenv_before_file" -unset _devenv_before_file - -# Save PATH before zsh init potentially modifies it -export _DEVENV_PATH="$PATH" - -# Save original ZDOTDIR so zsh init can restore it -if [ -n "$ZDOTDIR" ]; then - export _DEVENV_REAL_ZDOTDIR="$ZDOTDIR" -fi - -# Point ZDOTDIR to our init directory containing our .zshrc -export ZDOTDIR="/home/user01/Projects/score-system/.devenv/zsh" - -# Re-enable history before exec -set -o history - -# Exec into zsh (resolve via PATH if not absolute, since the devenv -# environment may have added it after this process started) -if [ ! -x "/run/current-system/sw/bin/zsh" ] && ! command -v "/run/current-system/sw/bin/zsh" >/dev/null 2>&1; then - echo "devenv: error: shell '/run/current-system/sw/bin/zsh' not found" >&2 - echo "devenv: add zsh to your devenv.nix packages or set SHELL to an absolute path" >&2 - exit 1 -fi -exec "/run/current-system/sw/bin/zsh" -i -echo "devenv: error: failed to exec into /run/current-system/sw/bin/zsh" >&2 -exit 1 diff --git a/.devenv/state/files.json b/.devenv/state/files.json deleted file mode 100644 index b4c7443..0000000 --- a/.devenv/state/files.json +++ /dev/null @@ -1 +0,0 @@ -{"managedFiles":[]} diff --git a/.devenv/task-names.txt b/.devenv/task-names.txt deleted file mode 100644 index 2ff6500..0000000 --- a/.devenv/task-names.txt +++ /dev/null @@ -1,6 +0,0 @@ -devenv:container:copy -devenv:enterShell -devenv:enterTest -devenv:files -devenv:files:cleanup -devenv:processes:server \ No newline at end of file diff --git a/.devenv/zsh/.zcompdump b/.devenv/zsh/.zcompdump deleted file mode 100644 index fa0536e..0000000 --- a/.devenv/zsh/.zcompdump +++ /dev/null @@ -1,2464 +0,0 @@ -#files: 2076 version: 5.9.1 - -_comps=( -'-' '_precommand' -'.' '_source' -'5g' '_go' -'5l' '_go' -'6g' '_go' -'6l' '_go' -'7z' '_7zip' -'7za' '_7zip' -'7zr' '_7zip' -'7zz' '_7zip' -'8g' '_go' -'8l' '_go' -'a2dismod' '_a2utils' -'a2dissite' '_a2utils' -'a2enmod' '_a2utils' -'a2ensite' '_a2utils' -'a2ps' '_a2ps' -'aaaa' '_hosts' -'aap' '_aap' -'abcde' '_abcde' -'ack' '_ack' -'ack2' '_ack' -'ack-grep' '_ack' -'ack-standalone' '_ack' -'acpi' '_acpi' -'acpiconf' '_acpiconf' -'acpitool' '_acpitool' -'acroread' '_acroread' -'adb' '_adb' -'add-zle-hook-widget' '_add-zle-hook-widget' -'add-zsh-hook' '_add-zsh-hook' -'ali' '_mh' -'alias' '_alias' -'amaya' '_webbrowser' -'analyseplugin' '_analyseplugin' -'animate' '_imagemagick' -'anno' '_mh' -'ansible' '_ansible' -'ansible-config' '_ansible' -'ansible-console' '_ansible' -'ansible-doc' '_ansible' -'ansible-galaxy' '_ansible' -'ansible-inventory' '_ansible' -'ansible-playbook' '_ansible' -'ansible-pull' '_ansible' -'ansible-vault' '_ansible' -'ant' '_ant' -'antiword' '_antiword' -'aodh' '_openstack' -'aoss' '_precommand' -'apache2ctl' '_apachectl' -'apachectl' '_apachectl' -'aplay' '_alsa-utils' -'apm' '_apm' -'appletviewer' '_java' -'apropos' '_man' -'apt' '_apt' -'apt-cache' '_apt' -'apt-cdrom' '_apt' -'apt-config' '_apt' -'apt-file' '_apt-file' -'apt-get' '_apt' -'aptitude' '_aptitude' -'apt-mark' '_apt' -'apt-move' '_apt-move' -'apt-show-versions' '_apt-show-versions' -'apvlv' '_pdf' -'arduino-ctags' '_ctags' -'arecord' '_alsa-utils' -'arena' '_webbrowser' -'_arguments' '__arguments' -'arp' '_arp' -'arping' '_arping' -'arptables' '_iptables' -'-array-value-' '_value' -'asciidoctor' '_asciidoctor' -'asciinema' '_asciinema' -'ash' '_sh' -'-assign-parameter-' '_assign' -'at' '_at' -'atq' '_at' -'atrm' '_at' -'attr' '_attr' -'audit2allow' '_selinux' -'audit2why' '_selinux' -'augtool' '_augeas' -'auto-apt' '_auto-apt' -'autoload' '_typeset' -'avahi-browse' '_avahi' -'avahi-browse-domains' '_avahi' -'avahi-resolve' '_avahi' -'avahi-resolve-address' '_avahi' -'avahi-resolve-host-name' '_avahi' -'avcstat' '_selinux' -'awk' '_awk' -'axi-cache' '_axi-cache' -'b2sum' '_md5sum' -'barbican' '_openstack' -'base32' '_base64' -'base64' '_base64' -'basename' '_basename' -'basenc' '_basenc' -'bash' '_bash' -'bat' '_bat' -'batch' '_at' -'baz' '_baz' -'beadm' '_beadm' -'bectl' '_bectl' -'beep' '_beep' -'bg' '_jobs_bg' -'bibtex' '_bibtex' -'bindkey' '_bindkey' -'bison' '_bison' -'blkid' '_blkid' -'bluetoothctl' '_bluetoothctl' -'bmake' '_make' -'bogofilter' '_bogofilter' -'bogotune' '_bogofilter' -'bogoutil' '_bogofilter' -'bootctl' '_bootctl' -'bpython' '_bpython' -'bpython2' '_bpython' -'bpython2-gtk' '_bpython' -'bpython2-urwid' '_bpython' -'bpython3' '_bpython' -'bpython3-gtk' '_bpython' -'bpython3-urwid' '_bpython' -'bpython-gtk' '_bpython' -'bpython-urwid' '_bpython' -'-brace-parameter-' '_brace_parameter' -'brctl' '_brctl' -'bsdconfig' '_bsdconfig' -'bsdgrep' '_grep' -'bsdinstall' '_bsdinstall' -'bsdtar' '_tar' -'btdownloadcurses' '_bittorrent' -'btdownloadgui' '_bittorrent' -'btdownloadheadless' '_bittorrent' -'btlaunchmany' '_bittorrent' -'btlaunchmanycurses' '_bittorrent' -'btmakemetafile' '_bittorrent' -'btreannounce' '_bittorrent' -'btrename' '_bittorrent' -'btrfs' '_btrfs' -'bts' '_bts' -'btshowmetainfo' '_bittorrent' -'bttrack' '_bittorrent' -'bug' '_bug' -'buildhash' '_ispell' -'builtin' '_builtin' -'bun' '_bun' -'bunzip2' '_bzip2' -'burst' '_mh' -'busctl' '_busctl' -'bzcat' '_bzip2' -'bzegrep' '_grep' -'bzfgrep' '_grep' -'bzgrep' '_grep' -'bzip2' '_bzip2' -'bzip2recover' '_bzip2' -'bzr' '_bzr' -'c++' '_gcc' -'cabal' '_cabal' -'cacaclock' '_cacaclock' -'caffeinate' '_caffeinate' -'cal' '_cal' -'calendar' '_calendar' -'cat' '_cat' -'catchsegv' '_precommand' -'cc' '_gcc' -'ccal' '_ccal' -'cd' '_cd' -'cdbs-edit-patch' '_cdbs-edit-patch' -'cdcd' '_cdcd' -'cdr' '_cdr' -'cdrdao' '_cdrdao' -'cdrecord' '_cdrecord' -'ceilometer' '_openstack' -'certtool' '_gnutls' -'cftp' '_twisted' -'chage' '_users' -'chattr' '_chattr' -'chcon' '_selinux' -'chdir' '_cd' -'chdman' '_chdman' -'checkmodule' '_selinux' -'checkpolicy' '_selinux' -'chflags' '_chflags' -'chfn' '_users' -'chgrp' '_chown' -'chimera' '_webbrowser' -'chkconfig' '_chkconfig' -'chkstow' '_stow' -'chmod' '_chmod' -'choom' '_choom' -'chown' '_chown' -'chpass' '_chsh' -'chroot' '_chroot' -'chrt' '_chrt' -'chsh' '_chsh' -'ci' '_rcs' -'cifsiostat' '_sysstat' -'cinder' '_openstack' -'ckeygen' '_twisted' -'cksum' '_cksum' -'clang' '_gcc' -'clang++' '_gcc' -'clay' '_clay' -'clear' '_nothing' -'cloudkitty' '_openstack' -'clusterdb' '_postgresql' -'cmp' '_cmp' -'co' '_rcs' -'code' '_code' -'col' '_col' -'column' '_column' -'combine' '_imagemagick' -'combinediff' '_patchutils' -'comm' '_comm' -'-command-' '_autocd' -'command' '_command' -'-command-line-' '_normal' -'comp' '_mh' -'compadd' '_compadd' -'compdef' '_compdef' -'compinit' '_compinit' -'composer' '_composer' -'composer.phar' '_composer' -'composite' '_imagemagick' -'compress' '_compress' -'conch' '_twisted' -'-condition-' '_condition' -'config.status' '_configure' -'configure' '_configure' -'convert' '_imagemagick' -'coreadm' '_coreadm' -'coredumpctl' '_coredumpctl' -'cowsay' '_cowsay' -'cowthink' '_cowsay' -'cp' '_cp' -'cpio' '_cpio' -'cplay' '_cplay' -'cpupower' '_cpupower' -'createdb' '_postgresql' -'createuser' '_postgresql' -'crontab' '_crontab' -'crsh' '_cssh' -'cryptsetup' '_cryptsetup' -'cscope' '_cscope' -'csh' '_sh' -'csplit' '_csplit' -'cssh' '_cssh' -'csup' '_csup' -'ctags' '_ctags' -'ctags-exuberant' '_ctags' -'ctags-universal' '_ctags' -'cu' '_cu' -'curl' '_curl' -'cut' '_cut' -'cvs' '_cvs' -'cvsup' '_cvsup' -'cygcheck' '_cygcheck' -'cygcheck.exe' '_cygcheck' -'cygpath' '_cygpath' -'cygpath.exe' '_cygpath' -'cygrunsrv' '_cygrunsrv' -'cygrunsrv.exe' '_cygrunsrv' -'cygserver' '_cygserver' -'cygserver.exe' '_cygserver' -'cygstart' '_cygstart' -'cygstart.exe' '_cygstart' -'dak' '_dak' -'darcs' '_darcs' -'dash' '_sh' -'date' '_date' -'dbus-launch' '_dbus' -'dbus-monitor' '_dbus' -'dbus-send' '_dbus' -'dch' '_debchange' -'dchroot' '_dchroot' -'dchroot-dsa' '_dchroot-dsa' -'dconf' '_dconf' -'dcop' '_dcop' -'dcopclient' '_dcop' -'dcopfind' '_dcop' -'dcopobject' '_dcop' -'dcopref' '_dcop' -'dcopstart' '_dcop' -'dcut' '_dcut' -'dd' '_dd' -'debchange' '_debchange' -'debcheckout' '_debcheckout' -'debdiff' '_debdiff' -'debfoster' '_debfoster' -'debmany' '_debmany' -'deborphan' '_deborphan' -'debsign' '_debsign' -'debsnap' '_debsnap' -'debuild' '_debuild' -'declare' '_typeset' -'-default-' '_default' -'defaults' '_defaults' -'designate' '_openstack' -'devenv' '_devenv' -'devtodo' '_devtodo' -'df' '_df' -'dhclient' '_dhclient' -'dhclient3' '_dhclient' -'dhcpinfo' '_dhcpinfo' -'dhomepage' '_dhomepage' -'dict' '_dict' -'diff' '_diff' -'diff3' '_diff3' -'diffstat' '_diffstat' -'dig' '_dig' -'dillo' '_webbrowser' -'dircmp' '_directories' -'dirs' '_dirs' -'disable' '_disable' -'disown' '_jobs_fg' -'display' '_imagemagick' -'dist' '_mh' -'django-admin' '_django' -'django-admin.py' '_django' -'dladm' '_dladm' -'dlocate' '_dlocate' -'dmake' '_make' -'dmesg' '_dmesg' -'dmidecode' '_dmidecode' -'dnctl' '_ipfw' -'dnf' '_dnf' -'dnf-2' '_dnf' -'dnf-3' '_dnf' -'dnf4' '_dnf' -'dnf5' '_dnf5' -'doas' '_doas' -'docker' '_docker' -'domainname' '_yp' -'dos2unix' '_dos2unix' -'dosdel' '_floppy' -'dosread' '_floppy' -'dpatch-edit-patch' '_dpatch-edit-patch' -'dpkg' '_dpkg' -'dpkg-buildpackage' '_dpkg-buildpackage' -'dpkg-cross' '_dpkg-cross' -'dpkg-deb' '_dpkg' -'dpkg-info' '_dpkg-info' -'dpkg-query' '_dpkg' -'dpkg-reconfigure' '_dpkg' -'dpkg-repack' '_dpkg-repack' -'dpkg-source' '_dpkg_source' -'dput' '_dput' -'drill' '_drill' -'dropbox' '_dropbox' -'dropdb' '_postgresql' -'dropuser' '_postgresql' -'dscverify' '_dscverify' -'dsh' '_dsh' -'dtrace' '_dtrace' -'dtruss' '_dtruss' -'du' '_du' -'dumpadm' '_dumpadm' -'dumper' '_dumper' -'dumper.exe' '_dumper' -'_dunst' '_dunst' -'dunst' '_dunst' -'_dunstctl' '_dunstctl' -'dunstctl' '_dunstctl' -'_dunstify' '_dunstify' -'dunstify' '_dunstify' -'dupload' '_dupload' -'dvibook' '_dvi' -'dviconcat' '_dvi' -'dvicopy' '_dvi' -'dvidvi' '_dvi' -'dvipdf' '_dvi' -'dvips' '_dvi' -'dviselect' '_dvi' -'dvitodvi' '_dvi' -'dvitype' '_dvi' -'dwb' '_webbrowser' -'e2label' '_e2label' -'eatmydata' '_precommand' -'ebtables' '_iptables' -'ecasound' '_ecasound' -'echo' '_echo' -'echotc' '_echotc' -'echoti' '_echoti' -'ed' '_ed' -'egrep' '_grep' -'elfdump' '_elfdump' -'elinks' '_elinks' -'emulate' '_emulate' -'enable' '_enable' -'enscript' '_enscript' -'entr' '_entr' -'env' '_env' -'eog' '_eog' -'epdfview' '_pdf' -'epsffit' '_psutils' -'-equal-' '_equal' -'erb' '_ruby' -'espeak' '_espeak' -'etags' '_etags' -'ethtool' '_ethtool' -'eu-nm' '_nm' -'eu-objdump' '_objdump' -'eu-readelf' '_readelf' -'eu-strings' '_strings' -'eval' '_precommand' -'eview' '_vim' -'evim' '_vim' -'evince' '_evince' -'ex' '_vi' -'exec' '_exec' -'expand' '_unexpand' -'explodepkg' '_pkgtool' -'export' '_typeset' -'express' '_webbrowser' -'extcheck' '_java' -'extractres' '_psutils' -'fakeroot' '_fakeroot' -'false' '_nothing' -'fastfetch' '_fastfetch' -'fc' '_fc' -'fc-list' '_xft_fonts' -'fc-match' '_xft_fonts' -'feh' '_feh' -'fetch' '_fetch' -'fetchmail' '_fetchmail' -'ffmpeg' '_ffmpeg' -'fg' '_jobs_fg' -'fgrep' '_grep' -'figlet' '_figlet' -'filterdiff' '_patchutils' -'find' '_find' -'findaffix' '_ispell' -'findmnt' '_findmnt' -'finger' '_finger' -'fink' '_fink' -'firefox' '_mozilla' -'-first-' '_first' -'fish' '_fish' -'fixdlsrps' '_psutils' -'fixfiles' '_selinux' -'fixfmps' '_psutils' -'fixmacps' '_psutils' -'fixpsditps' '_psutils' -'fixpspps' '_psutils' -'fixscribeps' '_psutils' -'fixtpps' '_psutils' -'fixwfwps' '_psutils' -'fixwpps' '_psutils' -'fixwwps' '_psutils' -'flac' '_flac' -'flex' '_flex' -'flex++' '_flex' -'flipdiff' '_patchutils' -'flist' '_mh' -'flists' '_mh' -'float' '_typeset' -'flowadm' '_flowadm' -'flua' '_lua' -'fmadm' '_fmadm' -'fmt' '_fmt' -'fmttest' '_mh' -'fned' '_zed' -'fnext' '_mh' -'fold' '_fold' -'folder' '_mh' -'folders' '_mh' -'fortune' '_fortune' -'forw' '_mh' -'fprev' '_mh' -'free' '_free' -'freebsd-make' '_make' -'freebsd-update' '_freebsd-update' -'freezer' '_openstack' -'fsh' '_fsh' -'fstat' '_fstat' -'fs_usage' '_fs_usage' -'ftp' '_hosts' -'functions' '_typeset' -'fuser' '_fuser' -'fusermount' '_fusermount' -'fusermount3' '_fusermount' -'fwhois' '_whois' -'fw_update' '_fw_update' -'g++' '_gcc' -'galeon' '_webbrowser' -'gawk' '_awk' -'gb2sum' '_md5sum' -'gbase32' '_base64' -'gbase64' '_base64' -'gbasename' '_basename' -'gcat' '_cat' -'gcc' '_gcc' -'gccgo' '_go' -'gchgrp' '_chown' -'gchmod' '_chmod' -'gchown' '_chown' -'gchroot' '_chroot' -'gcksum' '_cksum' -'gcmp' '_cmp' -'gcomm' '_comm' -'gcore' '_gcore' -'gcp' '_cp' -'gcut' '_cut' -'gdate' '_date' -'gdb' '_gdb' -'gdd' '_dd' -'gdf' '_df' -'gdiff' '_diff' -'gdu' '_du' -'geany' '_geany' -'gecho' '_echo' -'gegrep' '_grep' -'gem' '_gem' -'genisoimage' '_genisoimage' -'genv' '_env' -'getafm' '_psutils' -'getclip' '_getclip' -'getclip.exe' '_getclip' -'getconf' '_getconf' -'getent' '_getent' -'getfacl' '_getfacl' -'getfacl.exe' '_getfacl' -'getfattr' '_attr' -'getmail' '_getmail' -'getopt' '_getopt' -'getopts' '_vars' -'getpidprevcon' '_selinux' -'getsebool' '_selinux' -'gex' '_vim' -'gexpand' '_unexpand' -'gfgrep' '_grep' -'gfind' '_find' -'gfmt' '_fmt' -'gfold' '_fold' -'ggetopt' '_getopt' -'ggrep' '_grep' -'ggv' '_gnome-gv' -'ghead' '_head' -'ghostscript' '_ghostscript' -'ghostview' '_pspdf' -'gid' '_id' -'ginstall' '_install' -'git' '_git' -'git-buildpackage' '_git-buildpackage' -'git-cvsserver' '_git' -'gitk' '_git' -'git-receive-pack' '_git' -'git-shell' '_git' -'git-upload-archive' '_git' -'git-upload-pack' '_git' -'gjoin' '_join' -'glance' '_openstack' -'gln' '_ln' -'global' '_global' -'glocate' '_locate' -'gls' '_ls' -'gm' '_graphicsmagick' -'gmake' '_make' -'gmd5sum' '_md5sum' -'gmkdir' '_mkdir' -'gmkfifo' '_mkfifo' -'gmknod' '_mknod' -'gmktemp' '_mktemp' -'gmplayer' '_mplayer' -'gmv' '_mv' -'gnl' '_nl' -'gnocchi' '_openstack' -'gnome-gv' '_gnome-gv' -'gnumake' '_make' -'gnumfmt' '_numfmt' -'gnupod_addsong' '_gnupod' -'gnupod_addsong.pl' '_gnupod' -'gnupod_check' '_gnupod' -'gnupod_check.pl' '_gnupod' -'gnupod_INIT' '_gnupod' -'gnupod_INIT.pl' '_gnupod' -'gnupod_search' '_gnupod' -'gnupod_search.pl' '_gnupod' -'gnutls-cli' '_gnutls' -'gnutls-cli-debug' '_gnutls' -'gnutls-serv' '_gnutls' -'god' '_od' -'gofmt' '_go' -'gpasswd' '_gpasswd' -'gpaste' '_paste' -'gpatch' '_patch' -'gpg' '_gpg' -'gpg2' '_gpg' -'gpgv' '_gpg' -'gpg-zip' '_gpg' -'gphoto2' '_gphoto2' -'gprintenv' '_printenv' -'gprof' '_gprof' -'gqview' '_gqview' -'gradle' '_gradle' -'gradlew' '_gradle' -'grail' '_webbrowser' -'greadlink' '_readlink' -'grep' '_grep' -'grepdiff' '_patchutils' -'grep-excuses' '_grep-excuses' -'grm' '_rm' -'grmdir' '_rmdir' -'groff' '_groff' -'groupadd' '_user_admin' -'groupdel' '_groups' -'groupmod' '_user_admin' -'groups' '_users' -'growisofs' '_growisofs' -'gs' '_ghostscript' -'gsbj' '_pspdf' -'gsdj' '_pspdf' -'gsdj500' '_pspdf' -'gsed' '_sed' -'gseq' '_seq' -'gsettings' '_gsettings' -'gsha1sum' '_md5sum' -'gsha224sum' '_md5sum' -'gsha256sum' '_md5sum' -'gsha384sum' '_md5sum' -'gsha512sum' '_md5sum' -'gshred' '_shred' -'gshuf' '_shuf' -'gslj' '_pspdf' -'gslp' '_pspdf' -'gsnd' '_ghostscript' -'gsort' '_sort' -'gsplit' '_split' -'gstat' '_gstat' -'gstdbuf' '_stdbuf' -'gstrings' '_strings' -'gstty' '_stty' -'gsum' '_cksum' -'gtac' '_tac' -'gtail' '_tail' -'gtar' '_tar' -'gtee' '_tee' -'gtimeout' '_timeout' -'gtouch' '_touch' -'gtr' '_tr' -'gtty' '_tty' -'guilt' '_guilt' -'guilt-add' '_guilt' -'guilt-applied' '_guilt' -'guilt-delete' '_guilt' -'guilt-files' '_guilt' -'guilt-fold' '_guilt' -'guilt-fork' '_guilt' -'guilt-header' '_guilt' -'guilt-help' '_guilt' -'guilt-import' '_guilt' -'guilt-import-commit' '_guilt' -'guilt-init' '_guilt' -'guilt-new' '_guilt' -'guilt-next' '_guilt' -'guilt-patchbomb' '_guilt' -'guilt-pop' '_guilt' -'guilt-prev' '_guilt' -'guilt-push' '_guilt' -'guilt-rebase' '_guilt' -'guilt-refresh' '_guilt' -'guilt-rm' '_guilt' -'guilt-series' '_guilt' -'guilt-status' '_guilt' -'guilt-top' '_guilt' -'guilt-unapplied' '_guilt' -'guname' '_uname' -'gunexpand' '_unexpand' -'guniq' '_uniq' -'gunzip' '_gzip' -'guptime' '_uptime' -'gv' '_gv' -'gview' '_vim' -'gvim' '_vim' -'gvimdiff' '_vim' -'gwc' '_wc' -'gwho' '_who' -'gxargs' '_xargs' -'gzcat' '_gzip' -'gzegrep' '_grep' -'gzfgrep' '_grep' -'gzgrep' '_grep' -'gzilla' '_webbrowser' -'gzip' '_gzip' -'hash' '_hash' -'hd' '_hexdump' -'hdiutil' '_hdiutil' -'head' '_head' -'heat' '_openstack' -'hexdump' '_hexdump' -'hilite' '_precommand' -'histed' '_zed' -'history' '_fc' -'host' '_host' -'hostname' '_hostname' -'hostnamectl' '_hostnamectl' -'hotjava' '_webbrowser' -'htop' '_htop' -'hwinfo' '_hwinfo' -'hyprctl' '_hyprctl' -'hyprpm' '_hyprpm' -'iceweasel' '_mozilla' -'icombine' '_ispell' -'iconv' '_iconv' -'iconvconfig' '_iconvconfig' -'id' '_id' -'identify' '_imagemagick' -'ifconfig' '_ifconfig' -'ifdown' '_net_interfaces' -'iftop' '_iftop' -'ifup' '_net_interfaces' -'ijoin' '_ispell' -'import' '_imagemagick' -'inc' '_mh' -'includeres' '_psutils' -'inetadm' '_inetadm' -'info' '_texinfo' -'infocmp' '_terminals' -'initctl' '_initctl' -'initdb' '_postgresql' -'insmod' '_modutils' -'install' '_install' -'install-info' '_texinfo' -'installpkg' '_pkgtool' -'integer' '_typeset' -'interdiff' '_patchutils' -'invoke-rc.d' '_invoke-rc.d' -'ionice' '_ionice' -'iostat' '_iostat' -'ip' '_ip' -'ip6tables' '_iptables' -'ip6tables-restore' '_iptables' -'ip6tables-save' '_iptables' -'ipadm' '_ipadm' -'ipfw' '_ipfw' -'ipkg' '_opkg' -'ipsec' '_ipsec' -'ipset' '_ipset' -'iptables' '_iptables' -'iptables-restore' '_iptables' -'iptables-save' '_iptables' -'irb' '_ruby' -'ironic' '_openstack' -'irssi' '_irssi' -'isag' '_sysstat' -'ispell' '_ispell' -'iwconfig' '_iwconfig' -'jadetex' '_tex' -'jail' '_jail' -'jar' '_java' -'jarsigner' '_java' -'java' '_java' -'javac' '_java' -'javadoc' '_java' -'javah' '_java' -'javap' '_java' -'jdb' '_java' -'jexec' '_jexec' -'jls' '_jls' -'jobs' '_jobs_builtin' -'joe' '_joe' -'join' '_join' -'jot' '_jot' -'journalctl' '_journalctl' -'jq' '_jq' -'kdeconnect-cli' '_kdeconnect' -'kdump' '_kdump' -'keystone' '_openstack' -'keytool' '_java' -'kfmclient' '_kfmclient' -'kill' '_kill' -'killall' '_killall' -'killall5' '_killall' -'kioclient' '_kfmclient' -'kitty' '_kitty' -'kldload' '_kld' -'kldunload' '_kld' -'knock' '_knock' -'konqueror' '_webbrowser' -'kpartx' '_kpartx' -'kpdf' '_pdf' -'ksh' '_sh' -'ksh88' '_sh' -'ksh93' '_sh' -'ktrace' '_ktrace' -'kvno' '_kvno' -'last' '_last' -'lastb' '_last' -'latex' '_tex' -'latexmk' '_tex' -'ldap' '_ldap' -'ldapadd' '_openldap' -'ldapcompare' '_openldap' -'ldapdelete' '_openldap' -'ldapexop' '_openldap' -'ldapmodify' '_openldap' -'ldapmodrdn' '_openldap' -'ldappasswd' '_openldap' -'ldapsearch' '_openldap' -'ldapurl' '_openldap' -'ldapwhoami' '_openldap' -'ldconfig' '_ldconfig' -'ldconfig.real' '_ldconfig' -'ldd' '_ldd' -'less' '_less' -'let' '_math' -'lftp' '_ncftp' -'lha' '_lha' -'light' '_webbrowser' -'lighty-disable-mod' '_lighttpd' -'lighty-enable-mod' '_lighttpd' -'limit' '_limit' -'links' '_links' -'links2' '_links' -'lintian' '_lintian' -'lintian-info' '_lintian' -'linux' '_uml' -'lldb' '_lldb' -'llvm-g++' '_gcc' -'llvm-gcc' '_gcc' -'llvm-objdump' '_objdump' -'llvm-otool' '_otool' -'ln' '_ln' -'loadkeys' '_loadkeys' -'local' '_typeset' -'locale' '_locale' -'localectl' '_localectl' -'localedef' '_localedef' -'locate' '_locate' -'log' '_nothing' -'logger' '_logger' -'loginctl' '_loginctl' -'logname' '_nothing' -'look' '_look' -'losetup' '_losetup' -'lp' '_lp' -'lpadmin' '_lp' -'lpinfo' '_lp' -'lpoptions' '_lp' -'lpq' '_lp' -'lpr' '_lp' -'lprm' '_lp' -'lpstat' '_lp' -'ls' '_ls' -'lsattr' '_lsattr' -'lsblk' '_lsblk' -'lscfg' '_lscfg' -'lsd' '_lsd' -'lsdev' '_lsdev' -'lsdiff' '_patchutils' -'lslv' '_lslv' -'lsmod' '_modutils' -'lsns' '_lsns' -'lsof' '_lsof' -'lspv' '_lspv' -'lsusb' '_lsusb' -'lsvg' '_lsvg' -'ltrace' '_ltrace' -'lua' '_lua' -'lualatex' '_tex' -'luarocks' '_luarocks' -'lvchange' '_lvm2' -'lvconvert' '_lvm2' -'lvcreate' '_lvm2' -'lvdisplay' '_lvm2' -'lvextend' '_lvm2' -'lvm' '_lvm2' -'lvmconfig' '_lvm2' -'lvmdiskscan' '_lvm2' -'lvmdump' '_lvm2' -'lvreduce' '_lvm2' -'lvremove' '_lvm2' -'lvrename' '_lvm2' -'lvresize' '_lvm2' -'lvs' '_lvm2' -'lvscan' '_lvm2' -'lynx' '_lynx' -'lz4' '_lz4' -'lz4c' '_lz4' -'lz4c32' '_lz4' -'lz4cat' '_lz4' -'lzcat' '_xz' -'lzma' '_xz' -'lzop' '_lzop' -'m-a' '_module-assistant' -'mac2unix' '_dos2unix' -'machinectl' '_machinectl' -'madison' '_madison' -'magnum' '_openstack' -'mail' '_mail' -'Mail' '_mail' -'mailx' '_mail' -'make' '_make' -'makeinfo' '_texinfo' -'make-kpkg' '_make-kpkg' -'makepkg' '_pkgtool' -'man' '_man' -'manage.py' '_django' -'manila' '_openstack' -'mark' '_mh' -'mat' '_mat' -'mat2' '_mat2' -'matchpathcon' '_selinux' -'-math-' '_math' -'matlab' '_matlab' -'mattrib' '_mtools' -'mcd' '_mtools' -'mcopy' '_mtools' -'md2' '_cksum' -'md4' '_cksum' -'md5' '_cksum' -'md5sum' '_md5sum' -'mdadm' '_mdadm' -'mdel' '_mtools' -'mdeltree' '_mtools' -'mdfind' '_mdfind' -'mdir' '_mtools' -'mdls' '_mdls' -'mdo' '_mdo' -'mdu' '_mtools' -'mdutil' '_mdutil' -'members' '_members' -'mencal' '_mencal' -'mere' '_mere' -'merge' '_rcs' -'mergechanges' '_mergechanges' -'metaflac' '_flac' -'mformat' '_mtools' -'mgv' '_pspdf' -'mhfixmsg' '_mh' -'mhlist' '_mh' -'mhmail' '_mh' -'mhn' '_mh' -'mhparam' '_mh' -'mhpath' '_mh' -'mhshow' '_mh' -'mhstore' '_mh' -'mii-tool' '_mii-tool' -'mistral' '_openstack' -'mixerctl' '_mixerctl' -'mkdir' '_mkdir' -'mkfifo' '_mkfifo' -'mkisofs' '_growisofs' -'mknod' '_mknod' -'mksh' '_sh' -'mkshortcut' '_mkshortcut' -'mkshortcut.exe' '_mkshortcut' -'mktemp' '_mktemp' -'mktunes' '_gnupod' -'mktunes.pl' '_gnupod' -'mkzsh' '_mkzsh' -'mkzsh.exe' '_mkzsh' -'mlabel' '_mtools' -'mlocate' '_locate' -'mmd' '_mtools' -'mmm' '_webbrowser' -'mmount' '_mtools' -'mmove' '_mtools' -'modinfo' '_modutils' -'modprobe' '_modutils' -'module' '_module' -'module-assistant' '_module-assistant' -'mogrify' '_imagemagick' -'monasca' '_openstack' -'mondoarchive' '_mondo' -'montage' '_imagemagick' -'moosic' '_moosic' -'Mosaic' '_webbrowser' -'mosh' '_mosh' -'mount' '_mount' -'mozilla' '_mozilla' -'mozilla-firefox' '_mozilla' -'mozilla-xremote-client' '_mozilla' -'mpc' '_mpc' -'mplayer' '_mplayer' -'mpstat' '_sysstat' -'mpv' '_mpv' -'mr' '_myrepos' -'mrd' '_mtools' -'mread' '_mtools' -'mren' '_mtools' -'msgchk' '_mh' -'mt' '_mt' -'mtn' '_monotone' -'mtoolstest' '_mtools' -'mtr' '_mtr' -'mtype' '_mtools' -'munchlist' '_ispell' -'mupdf' '_mupdf' -'murano' '_openstack' -'mush' '_mail' -'mutt' '_mutt' -'mv' '_mv' -'mvim' '_vim' -'mx' '_hosts' -'mysql' '_mysql_utils' -'mysqladmin' '_mysql_utils' -'mysqldiff' '_mysqldiff' -'mysqldump' '_mysql_utils' -'mysqlimport' '_mysql_utils' -'mysqlshow' '_mysql_utils' -'nail' '_mail' -'nano' '_nano' -'native2ascii' '_java' -'nautilus' '_nautilus' -'nawk' '_awk' -'nc' '_netcat' -'ncal' '_cal' -'ncftp' '_ncftp' -'ncl' '_nedit' -'nedit' '_nedit' -'nedit-client' '_nedit' -'nedit-nc' '_nedit' -'neomutt' '_mutt' -'netcat' '_netcat' -'netrik' '_webbrowser' -'netscape' '_netscape' -'netstat' '_netstat' -'nettop' '_nettop' -'networkctl' '_networkctl' -'networksetup' '_networksetup' -'neutron' '_openstack' -'new' '_mh' -'newgrp' '_groups' -'newrole' '_selinux' -'next' '_mh' -'nginx' '_nginx' -'ngrep' '_ngrep' -'nice' '_nice' -'nix' '_nix' -'nix-build' '_nix-build' -'nix-channel' '_nix-channel' -'nix-collect-garbage' '_nix-collect-garbage' -'nix-copy-closure' '_nix-copy-closure' -'nix-env' '_nix-env' -'nix-hash' '_nix-hash' -'nix-install-package' '_nix-install-package' -'nix-instantiate' '_nix-instantiate' -'nixops' '_nixops' -'nixos-build-vms' '_nixos-build-vms' -'nixos-container' '_nixos-container' -'nixos-generate-config' '_nixos-generate-config' -'nixos-install' '_nixos-install' -'nixos-option' '_nixos-option' -'nixos-rebuild' '_nixos-rebuild' -'nixos-version' '_nixos-version' -'nix-prefetch-url' '_nix-prefetch-url' -'nix-push' '_nix-push' -'nix-shell' '_nix-shell' -'nix-store' '_nix-store' -'nkf' '_nkf' -'nl' '_nl' -'nm' '_nm' -'nmap' '_nmap' -'nmblookup' '_samba' -'nmcli' '_networkmanager' -'nocorrect' '_precommand' -'noglob' '_precommand' -'nohup' '_precommand' -'nova' '_openstack' -'npm' '_npm' -'ns' '_hosts' -'nsenter' '_nsenter' -'nslookup' '_nslookup' -'ntalk' '_other_accounts' -'numfmt' '_numfmt' -'nvim' '_vim' -'nvram' '_nvram' -'objdump' '_objdump' -'od' '_od' -'odme' '_object_classes' -'odmget' '_object_classes' -'odmshow' '_object_classes' -'ogg123' '_vorbis' -'oggdec' '_vorbis' -'oggenc' '_vorbis' -'ogginfo' '_vorbis' -'oksh' '_sh' -'okular' '_okular' -'oomctl' '_oomctl' -'open' '_open' -'opencode' '_opencode' -'openstack' '_openstack' -'opera' '_webbrowser' -'opera-next' '_webbrowser' -'opkg' '_opkg' -'opusdec' '_opustools' -'opusenc' '_opustools' -'opusinfo' '_opustools' -'osascript' '_osascript' -'osc' '_osc' -'otool' '_otool' -'p4' '_perforce' -'p4d' '_perforce' -'pack' '_pack' -'packf' '_mh' -'pandoc' '_pandoc' -'papers' '_papers' -'-parameter-' '_parameter' -'parsehdlist' '_urpmi' -'passwd' '_users' -'paste' '_paste' -'patch' '_patch' -'pax' '_pax' -'pbcopy' '_pbcopy' -'pbpaste' '_pbcopy' -'pbuilder' '_pbuilder' -'pcat' '_pack' -'pcp-htop' '_htop' -'pcred' '_pids' -'pdf2dsc' '_pdf' -'pdf2ps' '_pdf' -'pdffonts' '_pdf' -'pdfimages' '_pdf' -'pdfinfo' '_pdf' -'pdfjadetex' '_tex' -'pdflatex' '_tex' -'pdfopt' '_pdf' -'pdftex' '_tex' -'pdftexi2dvi' '_texinfo' -'pdftk' '_pdftk' -'pdftopbm' '_pdf' -'pdftops' '_pdf' -'pdftotext' '_pdf' -'pdksh' '_sh' -'perf' '_perf' -'perl' '_perl' -'perlbrew' '_perlbrew' -'perldoc' '_perldoc' -'pfctl' '_pfctl' -'pfexec' '_pfexec' -'pfiles' '_pids' -'pflags' '_pids' -'pg_config' '_postgresql' -'pg_ctl' '_postgresql' -'pg_dump' '_postgresql' -'pg_dumpall' '_postgresql' -'pg_isready' '_postgresql' -'pgrep' '_pgrep' -'pg_restore' '_postgresql' -'pg_upgrade' '_postgresql' -'php' '_php' -'pick' '_mh' -'picocom' '_picocom' -'pidof' '_pidof' -'pidstat' '_sysstat' -'pigz' '_gzip' -'pine' '_pine' -'pinef' '_pine' -'pinfo' '_texinfo' -'ping' '_ping' -'ping6' '_ping' -'piuparts' '_piuparts' -'pkg' '_pkg5' -'pkg_add' '_bsd_pkg' -'pkgadd' '_pkgadd' -'pkg-config' '_pkg-config' -'pkg_create' '_bsd_pkg' -'pkg_delete' '_bsd_pkg' -'pkgin' '_pkgin' -'pkg_info' '_bsd_pkg' -'pkginfo' '_pkginfo' -'pkgrm' '_pkgrm' -'pkgtool' '_pkgtool' -'pkill' '_pgrep' -'playerctl' '_playerctl' -'pldd' '_pids' -'plutil' '_plutil' -'pmake' '_make' -'pman' '_perl_modules' -'pmap' '_pmap' -'pmcat' '_perl_modules' -'pmdesc' '_perl_modules' -'pmeth' '_perl_modules' -'pmexp' '_perl_modules' -'pmfunc' '_perl_modules' -'pmload' '_perl_modules' -'pmls' '_perl_modules' -'pmpath' '_perl_modules' -'pmvers' '_perl_modules' -'podgrep' '_perl_modules' -'podpath' '_perl_modules' -'podtoc' '_perl_modules' -'poff' '_pon' -'policytool' '_java' -'pon' '_pon' -'popd' '_directory_stack' -'portaudit' '_portaudit' -'portlint' '_portlint' -'portmaster' '_portmaster' -'portsnap' '_portsnap' -'postconf' '_postfix' -'postgres' '_postgresql' -'postmaster' '_postgresql' -'postqueue' '_postfix' -'postsuper' '_postfix' -'powerd' '_powerd' -'pr' '_pr' -'prev' '_mh' -'print' '_print' -'printenv' '_printenv' -'printf' '_print' -'procstat' '_procstat' -'prompt' '_prompt' -'prove' '_prove' -'prstat' '_prstat' -'prun' '_pids' -'ps' '_ps' -'ps2ascii' '_pspdf' -'ps2epsi' '_postscript' -'ps2pdf' '_postscript' -'ps2pdf12' '_postscript' -'ps2pdf13' '_postscript' -'ps2pdf14' '_postscript' -'ps2pdfwr' '_postscript' -'ps2ps' '_postscript' -'psbook' '_psutils' -'pscp' '_pscp' -'pscp.exe' '_pscp' -'psed' '_sed' -'psig' '_pids' -'psmerge' '_psutils' -'psmulti' '_postscript' -'psnup' '_psutils' -'psql' '_postgresql' -'psresize' '_psutils' -'psselect' '_psutils' -'pstack' '_pids' -'pstoedit' '_pspdf' -'pstop' '_pids' -'pstops' '_psutils' -'pstotgif' '_pspdf' -'pswrap' '_postscript' -'ptree' '_ptree' -'ptx' '_ptx' -'pump' '_pump' -'pushd' '_cd' -'putclip' '_putclip' -'putclip.exe' '_putclip' -'pv' '_pv' -'pvchange' '_lvm2' -'pvck' '_lvm2' -'pvcreate' '_lvm2' -'pvdisplay' '_lvm2' -'pvmove' '_lvm2' -'pvremove' '_lvm2' -'pvresize' '_lvm2' -'pvs' '_lvm2' -'pvscan' '_lvm2' -'pwait' '_pids' -'pwdx' '_pids' -'pwgen' '_pwgen' -'pyhtmlizer' '_twisted' -'qdbus' '_qdbus' -'qiv' '_qiv' -'qtplay' '_qtplay' -'querybts' '_bug' -'quilt' '_quilt' -'r' '_fc' -'rake' '_rake' -'ranlib' '_ranlib' -'rar' '_rar' -'rc' '_sh' -'rcctl' '_rcctl' -'rclone' '_rclone' -'rcp' '_rlogin' -'rcs' '_rcs' -'rcsdiff' '_rcs' -'rdesktop' '_rdesktop' -'read' '_read' -'readelf' '_readelf' -'readlink' '_readlink' -'readonly' '_typeset' -'readshortcut' '_readshortcut' -'readshortcut.exe' '_readshortcut' -'rebootin' '_rebootin' -'-redirect-' '_redirect' -'-redirect-,<,bunzip2' '_bzip2' -'-redirect-,<,bzip2' '_bzip2' -'-redirect-,>,bzip2' '_bzip2' -'-redirect-,<,compress' '_compress' -'-redirect-,>,compress' '_compress' -'-redirect-,-default-,-default-' '_files' -'-redirect-,<,gunzip' '_gzip' -'-redirect-,<,gzip' '_gzip' -'-redirect-,>,gzip' '_gzip' -'-redirect-,<,uncompress' '_compress' -'-redirect-,<,unxz' '_xz' -'-redirect-,<,unzstd' '_zstd' -'-redirect-,<,xz' '_xz' -'-redirect-,>,xz' '_xz' -'-redirect-,<,zstd' '_zstd' -'-redirect-,>,zstd' '_zstd' -'refile' '_mh' -'rehash' '_hash' -'reindexdb' '_postgresql' -'reload' '_initctl' -'removepkg' '_pkgtool' -'remsh' '_rlogin' -'renice' '_renice' -'repl' '_mh' -'reportbug' '_bug' -'reprepro' '_reprepro' -'resolvectl' '_resolvectl' -'restart' '_initctl' -'restorecon' '_selinux' -'retawq' '_webbrowser' -'rg' '_rg' -'rgrep' '_grep' -'rgview' '_vim' -'rgvim' '_vim' -'ri' '_ri' -'rlogin' '_rlogin' -'rm' '_rm' -'rmadison' '_madison' -'rmd160' '_cksum' -'rmdir' '_rmdir' -'rmf' '_mh' -'rmic' '_java' -'rmid' '_java' -'rmiregistry' '_java' -'rmm' '_mh' -'rmmod' '_modutils' -'rnano' '_nano' -'route' '_route' -'rpm' '_rpm' -'rpmbuild' '_rpm' -'rpmkeys' '_rpm' -'rpmquery' '_rpm' -'rpmsign' '_rpm' -'rpmspec' '_rpm' -'rpmverify' '_rpm' -'rrdtool' '_rrdtool' -'rsh' '_rlogin' -'rsvg-convert' '_rsvg-convert' -'rsync' '_rsync' -'rtin' '_tin' -'rubber' '_rubber' -'rubber-info' '_rubber' -'rubber-pipe' '_rubber' -'ruby' '_ruby' -'ruby-mri' '_ruby' -'run0' '_run0' -'runcon' '_selinux' -'run-help' '_run-help' -'rup' '_hosts' -'rusage' '_precommand' -'rview' '_vim' -'rvim' '_vim' -'rwho' '_hosts' -'rxvt' '_urxvt' -'s2p' '_sed' -'sadf' '_sysstat' -'sahara' '_openstack' -'sar' '_sysstat' -'savecore' '_savecore' -'say' '_say' -'sbuild' '_sbuild' -'scan' '_mh' -'sccs' '_sccs' -'sccsdiff' '_sccs' -'sched' '_sched' -'schedtool' '_schedtool' -'schroot' '_schroot' -'scl' '_scl' -'scons' '_scons' -'scp' '_ssh' -'screen' '_screen' -'script' '_script' -'scriptreplay' '_script' -'scselect' '_scselect' -'sc_usage' '_sc_usage' -'scutil' '_scutil' -'seaf-cli' '_seafile' -'sealert' '_selinux' -'secon' '_selinux' -'sed' '_sed' -'sedismod' '_selinux' -'sedta' '_selinux' -'seinfo' '_selinux' -'selinuxconlist' '_selinux' -'selinuxdefcon' '_selinux' -'selinuxexeccon' '_selinux' -'semanage' '_selinux' -'semodule' '_selinux' -'semodule_unpackage' '_selinux' -'senlin' '_openstack' -'sepolgen' '_selinux' -'sepolicy' '_selinux' -'seq' '_seq' -'serialver' '_java' -'service' '_service' -'sesearch' '_selinux' -'sestatus' '_selinux' -'set' '_set' -'setenforce' '_selinux' -'setfacl' '_setfacl' -'setfacl.exe' '_setfacl' -'setfattr' '_attr' -'setopt' '_setopt' -'setpriv' '_setpriv' -'setsebool' '_selinux' -'setsid' '_setsid' -'setxkbmap' '_setxkbmap' -'sftp' '_ssh' -'sh' '_sh' -'sha1' '_cksum' -'sha1sum' '_md5sum' -'sha224sum' '_md5sum' -'sha256' '_cksum' -'sha256sum' '_md5sum' -'sha384' '_cksum' -'sha384sum' '_md5sum' -'sha512' '_cksum' -'sha512sum' '_md5sum' -'sha512t256' '_cksum' -'shasum' '_shasum' -'shift' '_arrays' -'shortcuts' '_shortcuts' -'show' '_mh' -'showchar' '_psutils' -'showmount' '_showmount' -'shred' '_shred' -'shuf' '_shuf' -'shutdown' '_shutdown' -'signify' '_signify' -'sioyek' '_sioyek' -'sisu' '_sisu' -'skein1024' '_cksum' -'skein256' '_cksum' -'skein512' '_cksum' -'skipstone' '_webbrowser' -'slabtop' '_slabtop' -'slitex' '_tex' -'slocate' '_locate' -'slogin' '_ssh' -'slrn' '_slrn' -'smartctl' '_smartmontools' -'smbclient' '_samba' -'smbcontrol' '_samba' -'smbstatus' '_samba' -'smit' '_smit' -'smitty' '_smit' -'snoop' '_snoop' -'soa' '_hosts' -'socket' '_socket' -'sockstat' '_sockstat' -'softwareupdate' '_softwareupdate' -'sort' '_sort' -'sortm' '_mh' -'source' '_source' -'spamassassin' '_spamassassin' -'split' '_split' -'splitdiff' '_patchutils' -'sqlite' '_sqlite' -'sqlite3' '_sqlite' -'sqsh' '_sqsh' -'sr' '_surfraw' -'srptool' '_gnutls' -'ss' '_ss' -'ssh' '_ssh' -'ssh-add' '_ssh' -'ssh-agent' '_ssh' -'ssh-copy-id' '_ssh' -'sshfs' '_sshfs' -'ssh-keygen' '_ssh' -'ssh-keyscan' '_ssh' -'star' '_tar' -'start' '_initctl' -'stat' '_stat' -'status' '_initctl' -'stdbuf' '_stdbuf' -'stop' '_initctl' -'stow' '_stow' -'strace' '_strace' -'strace64' '_strace' -'strftime' '_strftime' -'strings' '_strings' -'strip' '_strip' -'strongswan' '_ipsec' -'stty' '_stty' -'su' '_su' -'subl' '_sublimetext' -'-subscript-' '_subscript' -'sudo' '_sudo' -'sudoedit' '_sudo' -'sum' '_cksum' -'surfraw' '_surfraw' -'SuSEconfig' '_SUSEconfig' -'sv' '_runit' -'svcadm' '_svcadm' -'svccfg' '_svccfg' -'svcprop' '_svcprop' -'svcs' '_svcs' -'svn' '_subversion' -'svnadmin' '_subversion' -'svnadmin-static' '_subversion' -'svn-buildpackage' '_svn-buildpackage' -'svnlite' '_subversion' -'svnliteadmin' '_subversion' -'swaks' '_swaks' -'swanctl' '_swanctl' -'swift' '_swift' -'swiftc' '_swift' -'sw_vers' '_sw_vers' -'sync' '_nothing' -'sysclean' '_sysclean' -'sysctl' '_sysctl' -'sysmerge' '_sysmerge' -'syspatch' '_syspatch' -'sysrc' '_sysrc' -'systat' '_systat' -'systemctl' '_systemctl' -'systemd-analyze' '_systemd-analyze' -'systemd-ask-password' '_systemd' -'systemd-cat' '_systemd' -'systemd-cgls' '_systemd' -'systemd-cgtop' '_systemd' -'systemd-delta' '_systemd-delta' -'systemd-detect-virt' '_systemd' -'systemd-id128' '_systemd-id128' -'systemd-inhibit' '_systemd-inhibit' -'systemd-machine-id-setup' '_systemd' -'systemd-notify' '_systemd' -'systemd-nspawn' '_systemd-nspawn' -'systemd-path' '_systemd-path' -'systemd-resolve' '_resolvectl' -'systemd-run' '_systemd-run' -'systemd-tmpfiles' '_systemd-tmpfiles' -'systemd-tty-ask-password-agent' '_systemd' -'system_profiler' '_system_profiler' -'sysupgrade' '_sysupgrade' -'tac' '_tac' -'tacker' '_openstack' -'tail' '_tail' -'tailscale' '_tailscale' -'talk' '_other_accounts' -'tar' '_tar' -'tardy' '_tardy' -'tcpdump' '_tcpdump' -'tcp_open' '_tcpsys' -'tcptraceroute' '_tcptraceroute' -'tcsh' '_sh' -'tda' '_devtodo' -'tdd' '_devtodo' -'tde' '_devtodo' -'tdr' '_devtodo' -'tee' '_tee' -'telnet' '_telnet' -'tex' '_tex' -'texi2any' '_texinfo' -'texi2dvi' '_texinfo' -'texi2pdf' '_texinfo' -'texindex' '_texinfo' -'tg' '_topgit' -'tidy' '_tidy' -'tig' '_git' -'-tilde-' '_tilde' -'time' '_precommand' -'timedatectl' '_timedatectl' -'timeout' '_timeout' -'times' '_nothing' -'tin' '_tin' -'tkconch' '_twisted' -'tkinfo' '_texinfo' -'tla' '_tla' -'tload' '_tload' -'tmux' '_tmux' -'todo' '_devtodo' -'todo.sh' '_todo.sh' -'toilet' '_toilet' -'top' '_top' -'totdconfig' '_totd' -'touch' '_touch' -'tpb' '_tpb' -'tpkg-debarch' '_toolchain-source' -'tpkg-install' '_toolchain-source' -'tpkg-install-libc' '_toolchain-source' -'tpkg-make' '_toolchain-source' -'tpkg-update' '_toolchain-source' -'tput' '_tput' -'tr' '_tr' -'tracepath' '_tracepath' -'tracepath6' '_tracepath' -'traceroute' '_hosts' -'transmission-remote' '_transmission' -'trap' '_trap' -'trash' '_trash' -'tree' '_tree' -'trial' '_twisted' -'trove' '_openstack' -'true' '_nothing' -'truncate' '_truncate' -'truss' '_truss' -'tryaffix' '_ispell' -'tty' '_tty' -'ttyctl' '_ttyctl' -'tunctl' '_uml' -'tune2fs' '_tune2fs' -'tunes2pod' '_gnupod' -'tunes2pod.pl' '_gnupod' -'twidge' '_twidge' -'twist' '_twisted' -'twistd' '_twisted' -'txt' '_hosts' -'type' '_which' -'typeset' '_typeset' -'udevadm' '_udevadm' -'udisksctl' '_udisks2' -'ulimit' '_ulimit' -'uml_mconsole' '_uml' -'uml_moo' '_uml' -'uml_switch' '_uml' -'umount' '_mount' -'unace' '_unace' -'unalias' '_aliases' -'uname' '_uname' -'uncompress' '_compress' -'unexpand' '_unexpand' -'unfunction' '_functions' -'unhash' '_unhash' -'uniq' '_uniq' -'unison' '_unison' -'units' '_units' -'unix2dos' '_dos2unix' -'unix2mac' '_dos2unix' -'unlimit' '_limits' -'unlz4' '_lz4' -'unlzma' '_xz' -'unpack' '_pack' -'unpigz' '_gzip' -'unrar' '_rar' -'unset' '_vars' -'unsetopt' '_setopt' -'unshare' '_unshare' -'unwrapdiff' '_patchutils' -'unxz' '_xz' -'unzip' '_zip' -'unzstd' '_zstd' -'update-alternatives' '_update-alternatives' -'update-rc.d' '_update-rc.d' -'upgradepkg' '_pkgtool' -'upower' '_upower' -'uptime' '_uptime' -'urpme' '_urpmi' -'urpmf' '_urpmi' -'urpmi' '_urpmi' -'urpmi.addmedia' '_urpmi' -'urpmi.removemedia' '_urpmi' -'urpmi.update' '_urpmi' -'urpmq' '_urpmi' -'urxvt' '_urxvt' -'urxvt256c' '_urxvt' -'urxvt256cc' '_urxvt' -'urxvt256c-ml' '_urxvt' -'urxvt256c-mlc' '_urxvt' -'urxvtc' '_urxvt' -'usbconfig' '_usbconfig' -'uscan' '_uscan' -'useradd' '_user_admin' -'userdbctl' '_userdbctl' -'userdel' '_users' -'usermod' '_user_admin' -'vacuumdb' '_postgresql' -'valgrind' '_valgrind' -'validatetrans' '_selinux' -'-value-' '_value' -'-value-,ADB_TRACE,-default-' '_adb' -'-value-,ANDROID_LOG_TAGS,-default-' '_adb' -'-value-,ANDROID_SERIAL,-default-' '_adb' -'-value-,ANSIBLE_INVENTORY_ENABLED,-default-' '_ansible' -'-value-,ANSIBLE_STDOUT_CALLBACK,-default-' '_ansible' -'-value-,ANT_ARGS,-default-' '_ant' -'-value-,CFLAGS,-default-' '_gcc' -'-value-,CPPFLAGS,-default-' '_gcc' -'-value-,CXXFLAGS,-default-' '_gcc' -'-value-,DBUS_SESSION_BUS_ADDRESS,-default-' '_sd_bus_address' -'-value-,DBUS_SYSTEM_BUS_ADDRESS,-default-' '_sd_bus_address' -'-value-,-default-,-command-' '_zargs' -'-value-,-default-,-default-' '_value' -'-value-,DISPLAY,-default-' '_x_display' -'-value-,GREP_OPTIONS,-default-' '_grep' -'-value-,GZIP,-default-' '_gzip' -'-value-,LANG,-default-' '_locales' -'-value-,LANGUAGE,-default-' '_locales' -'-value-,LD_DEBUG,-default-' '_ld_debug' -'-value-,LDFLAGS,-default-' '_gcc' -'-value-,LESSCHARSET,-default-' '_less' -'-value-,LESS,-default-' '_less' -'-value-,LOOPDEV_DEBUG,-default-' '_losetup' -'-value-,LPDEST,-default-' '_printers' -'-value-,MPD_HOST,-default' '_mpc' -'-value-,P4CLIENT,-default-' '_perforce' -'-value-,P4MERGE,-default-' '_perforce' -'-value-,P4PORT,-default-' '_perforce' -'-value-,P4USER,-default-' '_perforce' -'-value-,PERLDOC,-default-' '_perldoc' -'-value-,PRINTER,-default-' '_printers' -'-value-,PROMPT2,-default-' '_ps1234' -'-value-,PROMPT3,-default-' '_ps1234' -'-value-,PROMPT4,-default-' '_ps1234' -'-value-,PROMPT,-default-' '_ps1234' -'-value-,PS1,-default-' '_ps1234' -'-value-,PS2,-default-' '_ps1234' -'-value-,PS3,-default-' '_ps1234' -'-value-,PS4,-default-' '_ps1234' -'-value-,RPROMPT2,-default-' '_ps1234' -'-value-,RPROMPT,-default-' '_ps1234' -'-value-,RPS1,-default-' '_ps1234' -'-value-,RPS2,-default-' '_ps1234' -'-value-,SPROMPT,-default-' '_ps1234' -'-value-,TERM,-default-' '_terminals' -'-value-,TERMINFO_DIRS,-default-' '_dir_list' -'-value-,TZ,-default-' '_time_zone' -'-value-,VALGRIND_OPTS,-default-' '_valgrind' -'-value-,WWW_HOME,-default-' '_urls' -'-value-,XML_CATALOG_FILES,-default-' '_xmlsoft' -'-value-,XZ_DEFAULTS,-default-' '_xz' -'-value-,XZ_OPT,-default-' '_xz' -'-vared-' '_in_vared' -'vared' '_vared' -'varlinkctl' '_varlinkctl' -'vcs_info_hookadd' '_vcs_info' -'vcs_info_hookdel' '_vcs_info' -'vgcfgbackup' '_lvm2' -'vgcfgrestore' '_lvm2' -'vgchange' '_lvm2' -'vgck' '_lvm2' -'vgconvert' '_lvm2' -'vgcreate' '_lvm2' -'vgdisplay' '_lvm2' -'vgexport' '_lvm2' -'vgextend' '_lvm2' -'vgimport' '_lvm2' -'vgimportclone' '_lvm2' -'vgmerge' '_lvm2' -'vgmknodes' '_lvm2' -'vgreduce' '_lvm2' -'vgremove' '_lvm2' -'vgrename' '_lvm2' -'vgs' '_lvm2' -'vgscan' '_lvm2' -'vgsplit' '_lvm2' -'vi' '_vi' -'view' '_vi' -'vim' '_vim' -'vim-addons' '_vim-addons' -'vimdiff' '_vim' -'virsh' '_libvirt' -'virt-admin' '_libvirt' -'virt-host-validate' '_libvirt' -'virt-pki-validate' '_libvirt' -'virt-xml-validate' '_libvirt' -'visudo' '_visudo' -'vitrage' '_openstack' -'vmctl' '_vmctl' -'vmstat' '_vmstat' -'vncserver' '_vnc' -'vncviewer' '_vnc' -'vorbiscomment' '_vorbis' -'vpnc' '_vpnc' -'vpnc-connect' '_vpnc' -'vserver' '_vserver' -'w' '_w' -'w3m' '_w3m' -'wait' '_wait' -'wajig' '_wajig' -'watch' '_watch' -'watcher' '_openstack' -'wc' '_wc' -'wget' '_wget' -'whatis' '_man' -'whence' '_which' -'where' '_which' -'whereis' '_whereis' -'which' '_which' -'which-pkg-broke' '_which-pkg-broke' -'who' '_who' -'whoami' '_nothing' -'whois' '_whois' -'whom' '_mh' -'wiggle' '_wiggle' -'wipefs' '_wipefs' -'wl-copy' '_wl-copy' -'wlogout' '_wlogout' -'wl-paste' '_wl-paste' -'wodim' '_cdrecord' -'wpa_cli' '_wpa_cli' -'wpaperctl' '_wpaperctl' -'wpaperd' '_wpaperd' -'wpctl' '_wpctl' -'write' '_users_on' -'www' '_webbrowser' -'xargs' '_xargs' -'xattr' '_attr' -'xauth' '_xauth' -'xautolock' '_xautolock' -'xclip' '_xclip' -'xcode-select' '_xcode-select' -'xdpyinfo' '_x_utils' -'xdvi' '_xdvi' -'xelatex' '_tex' -'xetex' '_tex' -'xev' '_x_utils' -'xfconf-query' '_xfconf-query' -'xfd' '_x_utils' -'xfig' '_xfig' -'xfontsel' '_x_utils' -'xfreerdp' '_rdesktop' -'xhost' '_x_utils' -'xinput' '_xinput' -'xkill' '_x_utils' -'xli' '_xloadimage' -'xloadimage' '_xloadimage' -'xlsatoms' '_x_utils' -'xlsclients' '_x_utils' -'xml' '_xmlstarlet' -'xmllint' '_xmlsoft' -'xmlstarlet' '_xmlstarlet' -'xmms2' '_xmms2' -'xmodmap' '_xmodmap' -'xmosaic' '_webbrowser' -'xon' '_x_utils' -'xournal' '_xournal' -'xpdf' '_xpdf' -'xping' '_hosts' -'xprop' '_x_utils' -'xrandr' '_xrandr' -'xrdb' '_x_utils' -'xscreensaver-command' '_xscreensaver' -'xset' '_xset' -'xsetbg' '_xloadimage' -'xsetroot' '_x_utils' -'xsltproc' '_xmlsoft' -'xterm' '_xterm' -'xtightvncviewer' '_vnc' -'xtp' '_imagemagick' -'xv' '_xv' -'xview' '_xloadimage' -'xvnc4viewer' '_vnc' -'xvncviewer' '_vnc' -'xwd' '_x_utils' -'xwininfo' '_x_utils' -'xwit' '_xwit' -'xwud' '_x_utils' -'xxd' '_xxd' -'xz' '_xz' -'xzcat' '_xz' -'yafc' '_yafc' -'yash' '_sh' -'yast' '_yast' -'yast2' '_yast' -'ypbind' '_yp' -'ypcat' '_yp' -'ypmatch' '_yp' -'yppasswd' '_yp' -'yppoll' '_yp' -'yppush' '_yp' -'ypserv' '_yp' -'ypset' '_yp' -'ypwhich' '_yp' -'ypxfr' '_yp' -'ytalk' '_other_accounts' -'yum' '_yum' -'yumdb' '_yum' -'zargs' '_zargs' -'zcalc' '_zcalc' -'-zcalc-line-' '_zcalc_line' -'zcat' '_zcat' -'zcompile' '_zcompile' -'zcp' '_zmv' -'zdb' '_zfs' -'zdelattr' '_zattr' -'zdump' '_zdump' -'zeal' '_zeal' -'zed' '_zed' -'zegrep' '_grep' -'zen' '_webbrowser' -'zf_chgrp' '_chown' -'zf_chmod' '_chmod' -'zf_chown' '_chown' -'zfgrep' '_grep' -'zf_ln' '_ln' -'zf_mkdir' '_mkdir' -'zf_mv' '_mv' -'zf_rm' '_rm' -'zf_rmdir' '_rmdir' -'zfs' '_zfs' -'zgetattr' '_zattr' -'zgrep' '_grep' -'zip' '_zip' -'zipinfo' '_zip' -'zle' '_zle' -'zlistattr' '_zattr' -'zln' '_zmv' -'zlogin' '_zlogin' -'zmail' '_mail' -'zmodload' '_zmodload' -'zmv' '_zmv' -'zone' '_hosts' -'zoneadm' '_zoneadm' -'zparseopts' '_zparseopts' -'zpool' '_zfs' -'zpty' '_zpty' -'zsetattr' '_zattr' -'zsh' '_zsh' -'zsh-mime-handler' '_zsh-mime-handler' -'zsocket' '_zsocket' -'zstat' '_stat' -'zstd' '_zstd' -'zstdcat' '_zstd' -'zstdmt' '_zstd' -'zstream' '_zfs' -'zstyle' '_zstyle' -'ztodo' '_ztodo' -'zun' '_openstack' -'zxpdf' '_xpdf' -'zypper' '_zypper' -) - -_services=( -'bzcat' 'bunzip2' -'dch' 'debchange' -'gchgrp' 'chgrp' -'gchown' 'chown' -'gnupod_addsong.pl' 'gnupod_addsong' -'gnupod_check.pl' 'gnupod_check' -'gnupod_INIT.pl' 'gnupod_INIT' -'gnupod_search.pl' 'gnupod_search' -'gpg2' 'gpg' -'gzcat' 'gunzip' -'iceweasel' 'firefox' -'lzcat' 'unxz' -'lzma' 'xz' -'Mail' 'mail' -'mailx' 'mail' -'mktunes.pl' 'mktunes' -'nail' 'mail' -'ncl' 'nc' -'nedit-client' 'nc' -'nedit-nc' 'nc' -'pcat' 'unpack' -'-redirect-,<,bunzip2' 'bunzip2' -'-redirect-,<,bzip2' 'bzip2' -'-redirect-,>,bzip2' 'bunzip2' -'-redirect-,<,compress' 'compress' -'-redirect-,>,compress' 'uncompress' -'-redirect-,<,gunzip' 'gunzip' -'-redirect-,<,gzip' 'gzip' -'-redirect-,>,gzip' 'gunzip' -'-redirect-,<,uncompress' 'uncompress' -'-redirect-,<,unxz' 'unxz' -'-redirect-,<,unzstd' 'unzstd' -'-redirect-,<,xz' 'xz' -'-redirect-,>,xz' 'unxz' -'-redirect-,<,zstd' 'zstd' -'-redirect-,>,zstd' 'unzstd' -'remsh' 'rsh' -'slogin' 'ssh' -'svnadmin-static' 'svnadmin' -'svnlite' 'svn' -'svnliteadmin' 'svnadmin' -'tunes2pod.pl' 'tunes2pod' -'unlzma' 'unxz' -'xelatex' 'latex' -'xetex' 'tex' -'xzcat' 'unxz' -'zf_chgrp' 'chgrp' -'zf_chown' 'chown' -) - -_patcomps=( -'*/(init|rc[0-9S]#).d/*' '_init_d' -) - -_postpatcomps=( -'_*' '_compadd' -'c++-*' '_gcc' -'g++-*' '_gcc' -'gcc-*' '_gcc' -'gem[0-9.]#' '_gem' -'lua[0-9.-]##' '_lua' -'(p[bgpn]m*|*top[bgpn]m)' '_pbm' -'php[0-9.-]' '_php' -'pip[0-9.]#' '_pip' -'pydoc[0-9.]#' '_pydoc' -'python[0-9.]#' '_python' -'qemu(|-system-*)' '_qemu' -'(ruby|[ei]rb)[0-9.]#' '_ruby' -'shasum(|5).*' '_shasum' -'(texi(2*|ndex))' '_texi' -'(tiff*|*2tiff|pal2rgb)' '_tiff' -'-value-,(ftp|http(|s))_proxy,-default-' '_urls' -'-value-,LC_*,-default-' '_locales' -'-value-,*path,-default-' '_directories' -'-value-,*PATH,-default-' '_dir_list' -'-value-,RUBY(LIB|OPT|PATH),-default-' '_ruby' -'*/X11(|R<4->)/*' '_x_arguments' -'yodl(|2*)' '_yodl' -'zf*' '_zftp' -) - -_compautos=( -'_call_program' '+X' -) - -zle -C _bash_complete-word .complete-word _bash_completions -zle -C _bash_list-choices .list-choices _bash_completions -zle -C _complete_debug .complete-word _complete_debug -zle -C _complete_help .complete-word _complete_help -zle -C _complete_tag .complete-word _complete_tag -zle -C _correct_filename .complete-word _correct_filename -zle -C _correct_word .complete-word _correct_word -zle -C _expand_alias .complete-word _expand_alias -zle -C _expand_word .complete-word _expand_word -zle -C _history-complete-newer .complete-word _history_complete_word -zle -C _history-complete-older .complete-word _history_complete_word -zle -C _list_expansions .list-choices _expand_word -zle -C _most_recent_file .complete-word _most_recent_file -zle -C _next_tags .list-choices _next_tags -zle -C _read_comp .complete-word _read_comp -bindkey '^X^R' _read_comp -bindkey '^X?' _complete_debug -bindkey '^XC' _correct_filename -bindkey '^Xa' _expand_alias -bindkey '^Xc' _correct_word -bindkey '^Xd' _list_expansions -bindkey '^Xe' _expand_word -bindkey '^Xh' _complete_help -bindkey '^Xm' _most_recent_file -bindkey '^Xn' _next_tags -bindkey '^Xt' _complete_tag -bindkey '^X~' _bash_list-choices -bindkey '^[,' _history-complete-newer -bindkey '^[/' _history-complete-older -bindkey '^[~' _bash_complete-word - -autoload -Uz _bun _bat _devenv _docker _dunst \ - _dunstctl _dunstify _fastfetch _kitty _lsd \ - _mpv _opencode _playerctl _rg _tailscale \ - _wl-copy _wlogout _wl-paste _wpaperctl _wpaperd \ - _bluetoothctl _bootctl _busctl _coredumpctl _docker \ - _hostnamectl _hyprctl _hyprpm _journalctl _localectl \ - _loginctl _machinectl _networkctl _nix _nix-build \ - _nix-channel _nix-collect-garbage _nix-common-options _nix-copy-closure _nix-env \ - _nix-hash _nix-install-package _nix-instantiate _nixops _nixos-build-vms \ - _nixos-container _nixos-generate-config _nixos-install _nixos-option _nixos-rebuild \ - _nixos-version _nix-prefetch-url _nix-push _nix-shell _nix-store \ - _oomctl _resolvectl _rsvg-convert _run0 _sd_bus_address \ - _sd_hosts_or_user_at_host _sd_machines _sd_outputmodes _sd_unit_files _systemctl \ - _systemd _systemd-analyze _systemd-delta _systemd-id128 _systemd-inhibit \ - _systemd-nspawn _systemd-path _systemd-run _systemd-tmpfiles _tailscale \ - _timedatectl _udevadm _udisks2 _upower _userdbctl \ - _varlinkctl _wpctl _7zip _a2ps _a2utils \ - _aap _abcde _absolute_command_paths _ack _acpi \ - _acpiconf _acpitool _acroread _adb _add-zle-hook-widget \ - _add-zsh-hook _alias _aliases _all_labels _all_matches \ - _alsa-utils _alternative _analyseplugin _ansible _ant \ - _antiword _apachectl _apm _approximate _apt \ - _apt-file _aptitude _apt-move _apt-show-versions _arch_archives \ - _arch_namespace _arg_compile __arguments _arguments _arp \ - _arping _arrays _asciidoctor _asciinema _as_if \ - _assign _at _attr _augeas _auto-apt \ - _autocd _avahi _awk _axi-cache _base64 \ - _basename _basenc _bash _bash_completions _baudrates \ - _baz _beadm _bectl _beep _be_name \ - _bibtex _bind_addresses _bindkey _bison _bittorrent \ - _blkid _bogofilter _bpf_filters _bpython _brace_parameter \ - _brctl _bsdconfig _bsd_disks _bsdinstall _bsd_pkg \ - _btrfs _bts _bug _builtin _bzip2 \ - _bzr _cabal _cacaclock _cache_invalid _caffeinate \ - _cal _calendar _call_function _canonical_paths _capabilities \ - _cat _ccal _cd _cdbs-edit-patch _cdcd \ - _cdr _cdrdao _cdrecord _chattr _chdman \ - _chflags _chkconfig _chmod _choom _chown \ - _chroot _chrt _chsh _cksum _clay \ - _cmdambivalent _cmdstring _cmp _code _col \ - _column _combination _comm _command _command_names \ - _compadd _compdef _compinit _complete _complete_debug \ - _complete_help _complete_help_generic _completers _complete_tag _comp_locale \ - _composer _compress _condition _configure _coreadm \ - _correct _correct_filename _correct_word _cowsay _cp \ - _cpio _cplay _cpupower _crontab _cryptsetup \ - _cscope _csplit _cssh _csup _ctags \ - _ctags_tags _cu _curl _cut _cvs \ - _cvsup _cygcheck _cygpath _cygrunsrv _cygserver \ - _cygstart _dak _darcs _date _date_formats \ - _dates _dbus _dchroot _dchroot-dsa _dconf \ - _dcop _dcut _dd _deb_architectures _debbugs_bugnumber \ - _debchange _debcheckout _deb_codenames _debdiff _deb_files \ - _debfoster _debmany _deborphan _deb_packages _debsign \ - _debsnap _debuild _default _defaults _delimiters \ - _describe _description _devtodo _df _dhclient \ - _dhcpinfo _dhomepage _dict _dict_words _diff \ - _diff3 _diff_options _diffstat _dig _directories \ - _directory_stack _dir_list _dirs _disable _dispatch \ - _django _dladm _dlocate _dmesg _dmidecode \ - _dnf _dnf5 _dns_types _doas _domains \ - _dos2unix _dpatch-edit-patch _dpkg _dpkg-buildpackage _dpkg-cross \ - _dpkg-info _dpkg-repack _dpkg_source _dput _drill \ - _dropbox _dscverify _dsh _dtrace _dtruss \ - _du _dumpadm _dumper _dupload _dvi \ - _dynamic_directory_name _e2label _ecasound _echo _echotc \ - _echoti _ed _elfdump _elinks _email_addresses \ - _emulate _enable _enscript _entr _env \ - _eog _equal _espeak _etags _ethtool \ - _evince _exec _expand _expand_alias _expand_word \ - _extensions _external_pwds _fakeroot _fbsd_architectures _fbsd_device_types \ - _fc _feh _fetch _fetchmail _ffmpeg \ - _figlet _file_descriptors _file_flags _file_modes _files \ - _file_systems _find _findmnt _find_net_interfaces _finger \ - _fink _first _fish _flac _flex \ - _floppy _flowadm _fmadm _fmt _fold \ - _fortune _free _freebsd-update _fsh _fstat \ - _fs_usage _functions _fuse_arguments _fuser _fusermount \ - _fuse_values _fw_update _gcc _gcore _gdb \ - _geany _gem _generic _genisoimage _getclip \ - _getconf _getent _getfacl _getmail _getopt \ - _ghostscript _git _git-buildpackage _global _global_tags \ - _globflags _globqual_delims _globquals _gnome-gv _gnu_generic \ - _gnupod _gnutls _go _gpasswd _gpg \ - _gphoto2 _gprof _gqview _gradle _graphicsmagick \ - _grep _grep-excuses _groff _groups _growisofs \ - _gsettings _gstat _guard _guilt _gv \ - _gzip _hash _have_glob_qual _hdiutil _head \ - _hexdump _history _history_complete_word _history_modifiers _host \ - _hostname _hosts _htop _hwinfo _iconv \ - _iconvconfig _id _ifconfig _iftop _ignored \ - _imagemagick _inetadm _initctl _init_d _install \ - _in_vared _invoke-rc.d _ionice _iostat _ip \ - _ipadm _ipfw _ipsec _ipset _iptables \ - _irssi _ispell _iwconfig _jail _jails \ - _java _java_class _jexec _jls _jobs \ - _jobs_bg _jobs_builtin _jobs_fg _joe _join \ - _jot _jq _kdeconnect _kdump _kfmclient \ - _kill _killall _kld _knock _kpartx \ - _ktrace _ktrace_points _kvno _last _ldap \ - _ldap_attributes _ldap_filters _ldconfig _ldd _ld_debug \ - _less _lha _libvirt _lighttpd _limit \ - _limits _links _lintian _list _list_files \ - _lldb _ln _loadkeys _locale _localedef \ - _locales _locate _logger _logical_volumes _login_classes \ - _look _losetup _lp _ls _lsattr \ - _lsblk _lscfg _lsdev _lslv _lsns \ - _lsof _lspv _lsusb _lsvg _ltrace \ - _lua _luarocks _lvm2 _lynx _lz4 \ - _lzop _mac_applications _mac_files_for_application _madison _mail \ - _mailboxes _main_complete _make _make-kpkg _man \ - _mat _mat2 _match _math _math_params \ - _matlab _md5sum _mdadm _mdfind _mdls \ - _mdo _mdutil _members _mencal _menu \ - _mere _mergechanges _message _mh _mii-tool \ - _mime_types _mixerctl _mkdir _mkfifo _mknod \ - _mkshortcut _mktemp _mkzsh _module _module-assistant \ - _module_math_func _modutils _mondo _monotone _moosic \ - _mosh _most_recent_file _mount _mozilla _mpc \ - _mplayer _mt _mtools _mtr _multi_parts \ - _mupdf _mutt _mv _my_accounts _myrepos \ - _mysqldiff _mysql_utils _nano _nautilus _nbsd_architectures \ - _ncftp _nedit _netcat _net_interfaces _netscape \ - _netstat _nettop _networkmanager _networksetup _newsgroups \ - _next_label _next_tags _nginx _ngrep _nice \ - _nkf _nl _nm _nmap _normal \ - _nothing _npm _nsenter _nslookup _numbers \ - _numfmt _nvram _objdump _object_classes _object_files \ - _obsd_architectures _od _okular _oldlist _open \ - _openldap _openstack _opkg _options _options_set \ - _options_unset _opustools _osascript _osc _other_accounts \ - _otool _pack _pandoc _papers _parameter \ - _parameters _paste _patch _patchutils _path_commands \ - _path_files _pax _pbcopy _pbm _pbuilder \ - _pdf _pdftk _perf _perforce _perl \ - _perl_basepods _perlbrew _perldoc _perl_modules _pfctl \ - _pfexec _pgids _pgrep _php _physical_volumes \ - _pick_variant _picocom _pidof _pids _pine \ - _ping _pip _piuparts _pkg5 _pkgadd \ - _pkg-config _pkgin _pkginfo _pkg_instance _pkgrm \ - _pkgtool _plutil _pmap _pon _portaudit \ - _portlint _portmaster _ports _portsnap _postfix \ - _postgresql _postscript _powerd _pr _precommand \ - _prefix _print _printenv _printers _process_names \ - _procstat _prompt _prove _prstat _ps \ - _ps1234 _pscp _pspdf _psutils _ptree \ - _ptx _pump _putclip _pv _pwgen \ - _pydoc _python _python_module-http.server _python_module-json.tool _python_modules \ - _python_module-venv _qdbus _qemu _qiv _qtplay \ - _quilt _rake _ranlib _rar _rcctl \ - _rclone _rcs _rdesktop _read _read_comp \ - _readelf _readlink _readshortcut _rebootin _redirect \ - _regex_arguments _regex_words _remote_files _renice _reprepro \ - _requested _retrieve_cache _retrieve_mac_apps _ri _rlogin \ - _rm _rmdir _route _routing_domains _routing_tables \ - _rpm _rrdtool _rsync _rubber _ruby \ - _run-help _runit _samba _savecore _say \ - _sbuild _sccs _sched _schedtool _schroot \ - _scl _scons _screen _script _scselect \ - _sc_usage _scutil _seafile _sed _selinux \ - _selinux_contexts _selinux_roles _selinux_types _selinux_users _sep_parts \ - _seq _sequence _service _services _set \ - _set_command _setfacl _setopt _setpriv _setsid \ - _setup _setxkbmap _sh _shasum _shortcuts \ - _showmount _shred _shuf _shutdown _signals \ - _signify _sioyek _sisu _slabtop _slrn \ - _smartmontools _smit _snoop _socket _sockstat \ - _softwareupdate _sort _source _spamassassin _split \ - _sqlite _sqsh _ss _ssh _sshfs \ - _ssh_hosts _stat _stdbuf _store_cache _stow \ - _strace _strftime _strings _strip _stty \ - _su _sub_commands _sublimetext _subscript _subversion \ - _sudo _suffix_alias_files _surfraw _SUSEconfig _svcadm \ - _svccfg _svcprop _svcs _svcs_fmri _svn-buildpackage \ - _swaks _swanctl _swift _sw_vers _sys_calls \ - _sysclean _sysctl _sysmerge _syspatch _sysrc \ - _sysstat _systat _system_profiler _sysupgrade _tac \ - _tags _tail _tar _tar_archive _tardy \ - _tcpdump _tcpsys _tcptraceroute _tee _telnet \ - _terminals _tex _texi _texinfo _tidy \ - _tiff _tilde _tilde_files _timeout _time_zone \ - _time_zone.orig _tin _tla _tload _tmux \ - _todo.sh _toilet _toolchain-source _top _topgit \ - _totd _touch _tpb _tput _tr \ - _tracepath _transmission _trap _trash _tree \ - _truncate _truss _tty _ttyctl _ttys \ - _tune2fs _twidge _twisted _typeset _ulimit \ - _uml _umountable _unace _uname _unexpand \ - _unhash _uniq _unison _units _unshare \ - _update-alternatives _update-rc.d _uptime _urls _urpmi \ - _urxvt _usbconfig _uscan _user_admin _user_at_host \ - _user_expand _user_math_func _users _users_on _valgrind \ - _value _values _vared _vars _vcs_info \ - _vcs_info_hooks _vi _vim _vim-addons _visudo \ - _vmctl _vmstat _vnc _volume_groups _vorbis \ - _vpnc _vserver _w _w3m _wait \ - _wajig _wakeup_capable_devices _wanted _watch _watch-snoop \ - _wc _webbrowser _wget _whereis _which \ - _which-pkg-broke _who _whois _widgets _wiggle \ - _wipefs _wpa_cli _xargs _x_arguments _xauth \ - _xautolock _x_borderwidth _xclip _xcode-select _x_color \ - _x_colormapid _x_cursor _x_display _xdvi _x_extension \ - _xfconf-query _xfig _x_font _xft_fonts _x_geometry \ - _xinput _x_keysym _xloadimage _x_locale _xmlsoft \ - _xmlstarlet _xmms2 _x_modifier _xmodmap _x_name \ - _xournal _xpdf _xrandr _x_resource _xscreensaver \ - _x_selection_timeout _xset _xt_arguments _xterm _x_title \ - _xt_session_id _x_utils _xv _x_visual _x_window \ - _xwit _xxd _xz _yafc _yast \ - _yodl _yp _yum _zargs _zattr \ - _zcalc _zcalc_line _zcat _zcompile _zdump \ - _zeal _zed _zfs _zfs_dataset _zfs_pool \ - _zftp _zip _zle _zlogin _zmodload \ - _zmv _zoneadm _zones _zparseopts _zpty \ - _zsh _zsh-mime-handler _zsocket _zstd _zstyle \ - _ztodo _zypper _7zip _a2ps _a2utils \ - _aap _abcde _absolute_command_paths _ack _acpi \ - _acpiconf _acpitool _acroread _adb _add-zle-hook-widget \ - _add-zsh-hook _alias _aliases _all_labels _all_matches \ - _alsa-utils _alternative _analyseplugin _ansible _ant \ - _antiword _apachectl _apm _approximate _apt \ - _apt-file _aptitude _apt-move _apt-show-versions _arch_archives \ - _arch_namespace _arg_compile __arguments _arguments _arp \ - _arping _arrays _asciidoctor _asciinema _as_if \ - _assign _at _attr _augeas _auto-apt \ - _autocd _avahi _awk _axi-cache _base64 \ - _basename _basenc _bash _bash_completions _baudrates \ - _baz _beadm _bectl _beep _be_name \ - _bibtex _bind_addresses _bindkey _bison _bittorrent \ - _blkid _bogofilter _bpf_filters _bpython _brace_parameter \ - _brctl _bsdconfig _bsd_disks _bsdinstall _bsd_pkg \ - _btrfs _bts _bug _builtin _bzip2 \ - _bzr _cabal _cacaclock _cache_invalid _caffeinate \ - _cal _calendar _call_function _canonical_paths _capabilities \ - _cat _ccal _cd _cdbs-edit-patch _cdcd \ - _cdr _cdrdao _cdrecord _chattr _chdman \ - _chflags _chkconfig _chmod _choom _chown \ - _chroot _chrt _chsh _cksum _clay \ - _cmdambivalent _cmdstring _cmp _code _col \ - _column _combination _comm _command _command_names \ - _compadd _compdef _compinit _complete _complete_debug \ - _complete_help _complete_help_generic _completers _complete_tag _comp_locale \ - _composer _compress _condition _configure _coreadm \ - _correct _correct_filename _correct_word _cowsay _cp \ - _cpio _cplay _cpupower _crontab _cryptsetup \ - _cscope _csplit _cssh _csup _ctags \ - _ctags_tags _cu _curl _cut _cvs \ - _cvsup _cygcheck _cygpath _cygrunsrv _cygserver \ - _cygstart _dak _darcs _date _date_formats \ - _dates _dbus _dchroot _dchroot-dsa _dconf \ - _dcop _dcut _dd _deb_architectures _debbugs_bugnumber \ - _debchange _debcheckout _deb_codenames _debdiff _deb_files \ - _debfoster _debmany _deborphan _deb_packages _debsign \ - _debsnap _debuild _default _defaults _delimiters \ - _describe _description _devtodo _df _dhclient \ - _dhcpinfo _dhomepage _dict _dict_words _diff \ - _diff3 _diff_options _diffstat _dig _directories \ - _directory_stack _dir_list _dirs _disable _dispatch \ - _django _dladm _dlocate _dmesg _dmidecode \ - _dnf _dnf5 _dns_types _doas _domains \ - _dos2unix _dpatch-edit-patch _dpkg _dpkg-buildpackage _dpkg-cross \ - _dpkg-info _dpkg-repack _dpkg_source _dput _drill \ - _dropbox _dscverify _dsh _dtrace _dtruss \ - _du _dumpadm _dumper _dupload _dvi \ - _dynamic_directory_name _e2label _ecasound _echo _echotc \ - _echoti _ed _elfdump _elinks _email_addresses \ - _emulate _enable _enscript _entr _env \ - _eog _equal _espeak _etags _ethtool \ - _evince _exec _expand _expand_alias _expand_word \ - _extensions _external_pwds _fakeroot _fbsd_architectures _fbsd_device_types \ - _fc _feh _fetch _fetchmail _ffmpeg \ - _figlet _file_descriptors _file_flags _file_modes _files \ - _file_systems _find _findmnt _find_net_interfaces _finger \ - _fink _first _fish _flac _flex \ - _floppy _flowadm _fmadm _fmt _fold \ - _fortune _free _freebsd-update _fsh _fstat \ - _fs_usage _functions _fuse_arguments _fuser _fusermount \ - _fuse_values _fw_update _gcc _gcore _gdb \ - _geany _gem _generic _genisoimage _getclip \ - _getconf _getent _getfacl _getmail _getopt \ - _ghostscript _git _git-buildpackage _global _global_tags \ - _globflags _globqual_delims _globquals _gnome-gv _gnu_generic \ - _gnupod _gnutls _go _gpasswd _gpg \ - _gphoto2 _gprof _gqview _gradle _graphicsmagick \ - _grep _grep-excuses _groff _groups _growisofs \ - _gsettings _gstat _guard _guilt _gv \ - _gzip _hash _have_glob_qual _hdiutil _head \ - _hexdump _history _history_complete_word _history_modifiers _host \ - _hostname _hosts _htop _hwinfo _iconv \ - _iconvconfig _id _ifconfig _iftop _ignored \ - _imagemagick _inetadm _initctl _init_d _install \ - _in_vared _invoke-rc.d _ionice _iostat _ip \ - _ipadm _ipfw _ipsec _ipset _iptables \ - _irssi _ispell _iwconfig _jail _jails \ - _java _java_class _jexec _jls _jobs \ - _jobs_bg _jobs_builtin _jobs_fg _joe _join \ - _jot _jq _kdeconnect _kdump _kfmclient \ - _kill _killall _kld _knock _kpartx \ - _ktrace _ktrace_points _kvno _last _ldap \ - _ldap_attributes _ldap_filters _ldconfig _ldd _ld_debug \ - _less _lha _libvirt _lighttpd _limit \ - _limits _links _lintian _list _list_files \ - _lldb _ln _loadkeys _locale _localedef \ - _locales _locate _logger _logical_volumes _login_classes \ - _look _losetup _lp _ls _lsattr \ - _lsblk _lscfg _lsdev _lslv _lsns \ - _lsof _lspv _lsusb _lsvg _ltrace \ - _lua _luarocks _lvm2 _lynx _lz4 \ - _lzop _mac_applications _mac_files_for_application _madison _mail \ - _mailboxes _main_complete _make _make-kpkg _man \ - _mat _mat2 _match _math _math_params \ - _matlab _md5sum _mdadm _mdfind _mdls \ - _mdo _mdutil _members _mencal _menu \ - _mere _mergechanges _message _mh _mii-tool \ - _mime_types _mixerctl _mkdir _mkfifo _mknod \ - _mkshortcut _mktemp _mkzsh _module _module-assistant \ - _module_math_func _modutils _mondo _monotone _moosic \ - _mosh _most_recent_file _mount _mozilla _mpc \ - _mplayer _mt _mtools _mtr _multi_parts \ - _mupdf _mutt _mv _my_accounts _myrepos \ - _mysqldiff _mysql_utils _nano _nautilus _nbsd_architectures \ - _ncftp _nedit _netcat _net_interfaces _netscape \ - _netstat _nettop _networkmanager _networksetup _newsgroups \ - _next_label _next_tags _nginx _ngrep _nice \ - _nkf _nl _nm _nmap _normal \ - _nothing _npm _nsenter _nslookup _numbers \ - _numfmt _nvram _objdump _object_classes _object_files \ - _obsd_architectures _od _okular _oldlist _open \ - _openldap _openstack _opkg _options _options_set \ - _options_unset _opustools _osascript _osc _other_accounts \ - _otool _pack _pandoc _papers _parameter \ - _parameters _paste _patch _patchutils _path_commands \ - _path_files _pax _pbcopy _pbm _pbuilder \ - _pdf _pdftk _perf _perforce _perl \ - _perl_basepods _perlbrew _perldoc _perl_modules _pfctl \ - _pfexec _pgids _pgrep _php _physical_volumes \ - _pick_variant _picocom _pidof _pids _pine \ - _ping _pip _piuparts _pkg5 _pkgadd \ - _pkg-config _pkgin _pkginfo _pkg_instance _pkgrm \ - _pkgtool _plutil _pmap _pon _portaudit \ - _portlint _portmaster _ports _portsnap _postfix \ - _postgresql _postscript _powerd _pr _precommand \ - _prefix _print _printenv _printers _process_names \ - _procstat _prompt _prove _prstat _ps \ - _ps1234 _pscp _pspdf _psutils _ptree \ - _ptx _pump _putclip _pv _pwgen \ - _pydoc _python _python_module-http.server _python_module-json.tool _python_modules \ - _python_module-venv _qdbus _qemu _qiv _qtplay \ - _quilt _rake _ranlib _rar _rcctl \ - _rclone _rcs _rdesktop _read _read_comp \ - _readelf _readlink _readshortcut _rebootin _redirect \ - _regex_arguments _regex_words _remote_files _renice _reprepro \ - _requested _retrieve_cache _retrieve_mac_apps _ri _rlogin \ - _rm _rmdir _route _routing_domains _routing_tables \ - _rpm _rrdtool _rsync _rubber _ruby \ - _run-help _runit _samba _savecore _say \ - _sbuild _sccs _sched _schedtool _schroot \ - _scl _scons _screen _script _scselect \ - _sc_usage _scutil _seafile _sed _selinux \ - _selinux_contexts _selinux_roles _selinux_types _selinux_users _sep_parts \ - _seq _sequence _service _services _set \ - _set_command _setfacl _setopt _setpriv _setsid \ - _setup _setxkbmap _sh _shasum _shortcuts \ - _showmount _shred _shuf _shutdown _signals \ - _signify _sioyek _sisu _slabtop _slrn \ - _smartmontools _smit _snoop _socket _sockstat \ - _softwareupdate _sort _source _spamassassin _split \ - _sqlite _sqsh _ss _ssh _sshfs \ - _ssh_hosts _stat _stdbuf _store_cache _stow \ - _strace _strftime _strings _strip _stty \ - _su _sub_commands _sublimetext _subscript _subversion \ - _sudo _suffix_alias_files _surfraw _SUSEconfig _svcadm \ - _svccfg _svcprop _svcs _svcs_fmri _svn-buildpackage \ - _swaks _swanctl _swift _sw_vers _sys_calls \ - _sysclean _sysctl _sysmerge _syspatch _sysrc \ - _sysstat _systat _system_profiler _sysupgrade _tac \ - _tags _tail _tar _tar_archive _tardy \ - _tcpdump _tcpsys _tcptraceroute _tee _telnet \ - _terminals _tex _texi _texinfo _tidy \ - _tiff _tilde _tilde_files _timeout _time_zone \ - _time_zone.orig _tin _tla _tload _tmux \ - _todo.sh _toilet _toolchain-source _top _topgit \ - _totd _touch _tpb _tput _tr \ - _tracepath _transmission _trap _trash _tree \ - _truncate _truss _tty _ttyctl _ttys \ - _tune2fs _twidge _twisted _typeset _ulimit \ - _uml _umountable _unace _uname _unexpand \ - _unhash _uniq _unison _units _unshare \ - _update-alternatives _update-rc.d _uptime _urls _urpmi \ - _urxvt _usbconfig _uscan _user_admin _user_at_host \ - _user_expand _user_math_func _users _users_on _valgrind \ - _value _values _vared _vars _vcs_info \ - _vcs_info_hooks _vi _vim _vim-addons _visudo \ - _vmctl _vmstat _vnc _volume_groups _vorbis \ - _vpnc _vserver _w _w3m _wait \ - _wajig _wakeup_capable_devices _wanted _watch _watch-snoop \ - _wc _webbrowser _wget _whereis _which \ - _which-pkg-broke _who _whois _widgets _wiggle \ - _wipefs _wpa_cli _xargs _x_arguments _xauth \ - _xautolock _x_borderwidth _xclip _xcode-select _x_color \ - _x_colormapid _x_cursor _x_display _xdvi _x_extension \ - _xfconf-query _xfig _x_font _xft_fonts _x_geometry \ - _xinput _x_keysym _xloadimage _x_locale _xmlsoft \ - _xmlstarlet _xmms2 _x_modifier _xmodmap _x_name \ - _xournal _xpdf _xrandr _x_resource _xscreensaver \ - _x_selection_timeout _xset _xt_arguments _xterm _x_title \ - _xt_session_id _x_utils _xv _x_visual _x_window \ - _xwit _xxd _xz _yafc _yast \ - _yodl _yp _yum _zargs _zattr \ - _zcalc _zcalc_line _zcat _zcompile _zdump \ - _zeal _zed _zfs _zfs_dataset _zfs_pool \ - _zftp _zip _zle _zlogin _zmodload \ - _zmv _zoneadm _zones _zparseopts _zpty \ - _zsh _zsh-mime-handler _zsocket _zstd _zstyle \ - _ztodo _zypper -autoload -Uz +X _call_program - -typeset -gUa _comp_assocs -_comp_assocs=( '' ) diff --git a/.devenv/zsh/.zcompdump-HACKSTATION-5.9.1 b/.devenv/zsh/.zcompdump-HACKSTATION-5.9.1 deleted file mode 100644 index a7eb973..0000000 --- a/.devenv/zsh/.zcompdump-HACKSTATION-5.9.1 +++ /dev/null @@ -1,2467 +0,0 @@ -#files: 2076 version: 5.9.1 - -_comps=( -'-' '_precommand' -'.' '_source' -'5g' '_go' -'5l' '_go' -'6g' '_go' -'6l' '_go' -'7z' '_7zip' -'7za' '_7zip' -'7zr' '_7zip' -'7zz' '_7zip' -'8g' '_go' -'8l' '_go' -'a2dismod' '_a2utils' -'a2dissite' '_a2utils' -'a2enmod' '_a2utils' -'a2ensite' '_a2utils' -'a2ps' '_a2ps' -'aaaa' '_hosts' -'aap' '_aap' -'abcde' '_abcde' -'ack' '_ack' -'ack2' '_ack' -'ack-grep' '_ack' -'ack-standalone' '_ack' -'acpi' '_acpi' -'acpiconf' '_acpiconf' -'acpitool' '_acpitool' -'acroread' '_acroread' -'adb' '_adb' -'add-zle-hook-widget' '_add-zle-hook-widget' -'add-zsh-hook' '_add-zsh-hook' -'ali' '_mh' -'alias' '_alias' -'amaya' '_webbrowser' -'analyseplugin' '_analyseplugin' -'animate' '_imagemagick' -'anno' '_mh' -'ansible' '_ansible' -'ansible-config' '_ansible' -'ansible-console' '_ansible' -'ansible-doc' '_ansible' -'ansible-galaxy' '_ansible' -'ansible-inventory' '_ansible' -'ansible-playbook' '_ansible' -'ansible-pull' '_ansible' -'ansible-vault' '_ansible' -'ant' '_ant' -'antiword' '_antiword' -'aodh' '_openstack' -'aoss' '_precommand' -'apache2ctl' '_apachectl' -'apachectl' '_apachectl' -'aplay' '_alsa-utils' -'apm' '_apm' -'appletviewer' '_java' -'apropos' '_man' -'apt' '_apt' -'apt-cache' '_apt' -'apt-cdrom' '_apt' -'apt-config' '_apt' -'apt-file' '_apt-file' -'apt-get' '_apt' -'aptitude' '_aptitude' -'apt-mark' '_apt' -'apt-move' '_apt-move' -'apt-show-versions' '_apt-show-versions' -'apvlv' '_pdf' -'arduino-ctags' '_ctags' -'arecord' '_alsa-utils' -'arena' '_webbrowser' -'_arguments' '__arguments' -'arp' '_arp' -'arping' '_arping' -'arptables' '_iptables' -'-array-value-' '_value' -'asciidoctor' '_asciidoctor' -'asciinema' '_asciinema' -'ash' '_sh' -'-assign-parameter-' '_assign' -'at' '_at' -'atq' '_at' -'atrm' '_at' -'attr' '_attr' -'audit2allow' '_selinux' -'audit2why' '_selinux' -'augtool' '_augeas' -'auto-apt' '_auto-apt' -'autoload' '_typeset' -'avahi-browse' '_avahi' -'avahi-browse-domains' '_avahi' -'avahi-resolve' '_avahi' -'avahi-resolve-address' '_avahi' -'avahi-resolve-host-name' '_avahi' -'avcstat' '_selinux' -'awk' '_awk' -'axi-cache' '_axi-cache' -'b2sum' '_md5sum' -'barbican' '_openstack' -'base32' '_base64' -'base64' '_base64' -'basename' '_basename' -'basenc' '_basenc' -'bash' '_bash' -'bat' '_bat' -'batch' '_at' -'baz' '_baz' -'beadm' '_beadm' -'bectl' '_bectl' -'beep' '_beep' -'bg' '_jobs_bg' -'bibtex' '_bibtex' -'bindkey' '_bindkey' -'bison' '_bison' -'blkid' '_blkid' -'bluetoothctl' '_bluetoothctl' -'bmake' '_make' -'bogofilter' '_bogofilter' -'bogotune' '_bogofilter' -'bogoutil' '_bogofilter' -'bootctl' '_bootctl' -'bpython' '_bpython' -'bpython2' '_bpython' -'bpython2-gtk' '_bpython' -'bpython2-urwid' '_bpython' -'bpython3' '_bpython' -'bpython3-gtk' '_bpython' -'bpython3-urwid' '_bpython' -'bpython-gtk' '_bpython' -'bpython-urwid' '_bpython' -'-brace-parameter-' '_brace_parameter' -'brctl' '_brctl' -'bsdconfig' '_bsdconfig' -'bsdgrep' '_grep' -'bsdinstall' '_bsdinstall' -'bsdtar' '_tar' -'btdownloadcurses' '_bittorrent' -'btdownloadgui' '_bittorrent' -'btdownloadheadless' '_bittorrent' -'btlaunchmany' '_bittorrent' -'btlaunchmanycurses' '_bittorrent' -'btmakemetafile' '_bittorrent' -'btreannounce' '_bittorrent' -'btrename' '_bittorrent' -'btrfs' '_btrfs' -'bts' '_bts' -'btshowmetainfo' '_bittorrent' -'bttrack' '_bittorrent' -'bug' '_bug' -'buildhash' '_ispell' -'builtin' '_builtin' -'bun' '_bun' -'bunzip2' '_bzip2' -'burst' '_mh' -'busctl' '_busctl' -'bzcat' '_bzip2' -'bzegrep' '_grep' -'bzfgrep' '_grep' -'bzgrep' '_grep' -'bzip2' '_bzip2' -'bzip2recover' '_bzip2' -'bzr' '_bzr' -'c++' '_gcc' -'cabal' '_cabal' -'cacaclock' '_cacaclock' -'caffeinate' '_caffeinate' -'cal' '_cal' -'calendar' '_calendar' -'cat' '_cat' -'catchsegv' '_precommand' -'cc' '_gcc' -'ccal' '_ccal' -'cd' '_cd' -'cdbs-edit-patch' '_cdbs-edit-patch' -'cdcd' '_cdcd' -'cdr' '_cdr' -'cdrdao' '_cdrdao' -'cdrecord' '_cdrecord' -'ceilometer' '_openstack' -'certtool' '_gnutls' -'cftp' '_twisted' -'chage' '_users' -'chattr' '_chattr' -'chcon' '_selinux' -'chdir' '_cd' -'chdman' '_chdman' -'checkmodule' '_selinux' -'checkpolicy' '_selinux' -'chflags' '_chflags' -'chfn' '_users' -'chgrp' '_chown' -'chimera' '_webbrowser' -'chkconfig' '_chkconfig' -'chkstow' '_stow' -'chmod' '_chmod' -'choom' '_choom' -'chown' '_chown' -'chpass' '_chsh' -'chroot' '_chroot' -'chrt' '_chrt' -'chsh' '_chsh' -'ci' '_rcs' -'cifsiostat' '_sysstat' -'cinder' '_openstack' -'ckeygen' '_twisted' -'cksum' '_cksum' -'clang' '_gcc' -'clang++' '_gcc' -'clay' '_clay' -'clear' '_nothing' -'cloudkitty' '_openstack' -'clusterdb' '_postgresql' -'cmp' '_cmp' -'co' '_rcs' -'code' '_code' -'col' '_col' -'column' '_column' -'combine' '_imagemagick' -'combinediff' '_patchutils' -'comm' '_comm' -'-command-' '_autocd' -'command' '_command' -'-command-line-' '_normal' -'comp' '_mh' -'compadd' '_compadd' -'compdef' '_compdef' -'compinit' '_compinit' -'composer' '_composer' -'composer.phar' '_composer' -'composite' '_imagemagick' -'compress' '_compress' -'conch' '_twisted' -'-condition-' '_condition' -'config.status' '_configure' -'configure' '_configure' -'convert' '_imagemagick' -'coreadm' '_coreadm' -'coredumpctl' '_coredumpctl' -'cowsay' '_cowsay' -'cowthink' '_cowsay' -'cp' '_cp' -'cpio' '_cpio' -'cplay' '_cplay' -'cpupower' '_cpupower' -'createdb' '_postgresql' -'createuser' '_postgresql' -'crontab' '_crontab' -'crsh' '_cssh' -'cryptsetup' '_cryptsetup' -'cscope' '_cscope' -'csh' '_sh' -'csplit' '_csplit' -'cssh' '_cssh' -'csup' '_csup' -'ctags' '_ctags' -'ctags-exuberant' '_ctags' -'ctags-universal' '_ctags' -'cu' '_cu' -'curl' '_curl' -'cut' '_cut' -'cvs' '_cvs' -'cvsup' '_cvsup' -'cygcheck' '_cygcheck' -'cygcheck.exe' '_cygcheck' -'cygpath' '_cygpath' -'cygpath.exe' '_cygpath' -'cygrunsrv' '_cygrunsrv' -'cygrunsrv.exe' '_cygrunsrv' -'cygserver' '_cygserver' -'cygserver.exe' '_cygserver' -'cygstart' '_cygstart' -'cygstart.exe' '_cygstart' -'dak' '_dak' -'darcs' '_darcs' -'dash' '_sh' -'date' '_date' -'dbus-launch' '_dbus' -'dbus-monitor' '_dbus' -'dbus-send' '_dbus' -'dch' '_debchange' -'dchroot' '_dchroot' -'dchroot-dsa' '_dchroot-dsa' -'dconf' '_dconf' -'dcop' '_dcop' -'dcopclient' '_dcop' -'dcopfind' '_dcop' -'dcopobject' '_dcop' -'dcopref' '_dcop' -'dcopstart' '_dcop' -'dcut' '_dcut' -'dd' '_dd' -'debchange' '_debchange' -'debcheckout' '_debcheckout' -'debdiff' '_debdiff' -'debfoster' '_debfoster' -'debmany' '_debmany' -'deborphan' '_deborphan' -'debsign' '_debsign' -'debsnap' '_debsnap' -'debuild' '_debuild' -'declare' '_typeset' -'-default-' '_default' -'defaults' '_defaults' -'designate' '_openstack' -'devenv' '_devenv' -'devtodo' '_devtodo' -'df' '_df' -'dhclient' '_dhclient' -'dhclient3' '_dhclient' -'dhcpinfo' '_dhcpinfo' -'dhomepage' '_dhomepage' -'dict' '_dict' -'diff' '_diff' -'diff3' '_diff3' -'diffstat' '_diffstat' -'dig' '_dig' -'dillo' '_webbrowser' -'dircmp' '_directories' -'dirs' '_dirs' -'disable' '_disable' -'disown' '_jobs_fg' -'display' '_imagemagick' -'dist' '_mh' -'django-admin' '_django' -'django-admin.py' '_django' -'dladm' '_dladm' -'dlocate' '_dlocate' -'dmake' '_make' -'dmesg' '_dmesg' -'dmidecode' '_dmidecode' -'dnctl' '_ipfw' -'dnf' '_dnf' -'dnf-2' '_dnf' -'dnf-3' '_dnf' -'dnf4' '_dnf' -'dnf5' '_dnf5' -'doas' '_doas' -'docker' '_docker' -'domainname' '_yp' -'dos2unix' '_dos2unix' -'dosdel' '_floppy' -'dosread' '_floppy' -'dpatch-edit-patch' '_dpatch-edit-patch' -'dpkg' '_dpkg' -'dpkg-buildpackage' '_dpkg-buildpackage' -'dpkg-cross' '_dpkg-cross' -'dpkg-deb' '_dpkg' -'dpkg-info' '_dpkg-info' -'dpkg-query' '_dpkg' -'dpkg-reconfigure' '_dpkg' -'dpkg-repack' '_dpkg-repack' -'dpkg-source' '_dpkg_source' -'dput' '_dput' -'drill' '_drill' -'dropbox' '_dropbox' -'dropdb' '_postgresql' -'dropuser' '_postgresql' -'dscverify' '_dscverify' -'dsh' '_dsh' -'dtrace' '_dtrace' -'dtruss' '_dtruss' -'du' '_du' -'dumpadm' '_dumpadm' -'dumper' '_dumper' -'dumper.exe' '_dumper' -'_dunst' '_dunst' -'dunst' '_dunst' -'_dunstctl' '_dunstctl' -'dunstctl' '_dunstctl' -'_dunstify' '_dunstify' -'dunstify' '_dunstify' -'dupload' '_dupload' -'dvibook' '_dvi' -'dviconcat' '_dvi' -'dvicopy' '_dvi' -'dvidvi' '_dvi' -'dvipdf' '_dvi' -'dvips' '_dvi' -'dviselect' '_dvi' -'dvitodvi' '_dvi' -'dvitype' '_dvi' -'dwb' '_webbrowser' -'e2label' '_e2label' -'eatmydata' '_precommand' -'ebtables' '_iptables' -'ecasound' '_ecasound' -'echo' '_echo' -'echotc' '_echotc' -'echoti' '_echoti' -'ed' '_ed' -'egrep' '_grep' -'elfdump' '_elfdump' -'elinks' '_elinks' -'emulate' '_emulate' -'enable' '_enable' -'enscript' '_enscript' -'entr' '_entr' -'env' '_env' -'eog' '_eog' -'epdfview' '_pdf' -'epsffit' '_psutils' -'-equal-' '_equal' -'erb' '_ruby' -'espeak' '_espeak' -'etags' '_etags' -'ethtool' '_ethtool' -'eu-nm' '_nm' -'eu-objdump' '_objdump' -'eu-readelf' '_readelf' -'eu-strings' '_strings' -'eval' '_precommand' -'eview' '_vim' -'evim' '_vim' -'evince' '_evince' -'ex' '_vi' -'exec' '_exec' -'expand' '_unexpand' -'explodepkg' '_pkgtool' -'export' '_typeset' -'express' '_webbrowser' -'extcheck' '_java' -'extractres' '_psutils' -'fakeroot' '_fakeroot' -'false' '_nothing' -'fastfetch' '_fastfetch' -'fc' '_fc' -'fc-list' '_xft_fonts' -'fc-match' '_xft_fonts' -'feh' '_feh' -'fetch' '_fetch' -'fetchmail' '_fetchmail' -'ffmpeg' '_ffmpeg' -'fg' '_jobs_fg' -'fgrep' '_grep' -'figlet' '_figlet' -'filterdiff' '_patchutils' -'find' '_find' -'findaffix' '_ispell' -'findmnt' '_findmnt' -'finger' '_finger' -'fink' '_fink' -'firefox' '_mozilla' -'-first-' '_first' -'fish' '_fish' -'fixdlsrps' '_psutils' -'fixfiles' '_selinux' -'fixfmps' '_psutils' -'fixmacps' '_psutils' -'fixpsditps' '_psutils' -'fixpspps' '_psutils' -'fixscribeps' '_psutils' -'fixtpps' '_psutils' -'fixwfwps' '_psutils' -'fixwpps' '_psutils' -'fixwwps' '_psutils' -'flac' '_flac' -'flex' '_flex' -'flex++' '_flex' -'flipdiff' '_patchutils' -'flist' '_mh' -'flists' '_mh' -'float' '_typeset' -'flowadm' '_flowadm' -'flua' '_lua' -'fmadm' '_fmadm' -'fmt' '_fmt' -'fmttest' '_mh' -'fned' '_zed' -'fnext' '_mh' -'fold' '_fold' -'folder' '_mh' -'folders' '_mh' -'fortune' '_fortune' -'forw' '_mh' -'fprev' '_mh' -'free' '_free' -'freebsd-make' '_make' -'freebsd-update' '_freebsd-update' -'freezer' '_openstack' -'fsh' '_fsh' -'fstat' '_fstat' -'fs_usage' '_fs_usage' -'ftp' '_hosts' -'functions' '_typeset' -'fuser' '_fuser' -'fusermount' '_fusermount' -'fusermount3' '_fusermount' -'fwhois' '_whois' -'fw_update' '_fw_update' -'g++' '_gcc' -'galeon' '_webbrowser' -'gawk' '_awk' -'gb2sum' '_md5sum' -'gbase32' '_base64' -'gbase64' '_base64' -'gbasename' '_basename' -'gcat' '_cat' -'gcc' '_gcc' -'gccgo' '_go' -'gchgrp' '_chown' -'gchmod' '_chmod' -'gchown' '_chown' -'gchroot' '_chroot' -'gcksum' '_cksum' -'gcmp' '_cmp' -'gcomm' '_comm' -'gcore' '_gcore' -'gcp' '_cp' -'gcut' '_cut' -'gdate' '_date' -'gdb' '_gdb' -'gdd' '_dd' -'gdf' '_df' -'gdiff' '_diff' -'gdu' '_du' -'geany' '_geany' -'gecho' '_echo' -'gegrep' '_grep' -'gem' '_gem' -'genisoimage' '_genisoimage' -'genv' '_env' -'getafm' '_psutils' -'getclip' '_getclip' -'getclip.exe' '_getclip' -'getconf' '_getconf' -'getent' '_getent' -'getfacl' '_getfacl' -'getfacl.exe' '_getfacl' -'getfattr' '_attr' -'getmail' '_getmail' -'getopt' '_getopt' -'getopts' '_vars' -'getpidprevcon' '_selinux' -'getsebool' '_selinux' -'gex' '_vim' -'gexpand' '_unexpand' -'gfgrep' '_grep' -'gfind' '_find' -'gfmt' '_fmt' -'gfold' '_fold' -'ggetopt' '_getopt' -'ggrep' '_grep' -'ggv' '_gnome-gv' -'ghead' '_head' -'ghostscript' '_ghostscript' -'ghostview' '_pspdf' -'gid' '_id' -'ginstall' '_install' -'git' '_git' -'git-buildpackage' '_git-buildpackage' -'git-cvsserver' '_git' -'gitk' '_git' -'git-receive-pack' '_git' -'git-shell' '_git' -'git-upload-archive' '_git' -'git-upload-pack' '_git' -'gjoin' '_join' -'glance' '_openstack' -'gln' '_ln' -'global' '_global' -'glocate' '_locate' -'gls' '_ls' -'gm' '_graphicsmagick' -'gmake' '_make' -'gmd5sum' '_md5sum' -'gmkdir' '_mkdir' -'gmkfifo' '_mkfifo' -'gmknod' '_mknod' -'gmktemp' '_mktemp' -'gmplayer' '_mplayer' -'gmv' '_mv' -'gnl' '_nl' -'gnocchi' '_openstack' -'gnome-gv' '_gnome-gv' -'gnumake' '_make' -'gnumfmt' '_numfmt' -'gnupod_addsong' '_gnupod' -'gnupod_addsong.pl' '_gnupod' -'gnupod_check' '_gnupod' -'gnupod_check.pl' '_gnupod' -'gnupod_INIT' '_gnupod' -'gnupod_INIT.pl' '_gnupod' -'gnupod_search' '_gnupod' -'gnupod_search.pl' '_gnupod' -'gnutls-cli' '_gnutls' -'gnutls-cli-debug' '_gnutls' -'gnutls-serv' '_gnutls' -'god' '_od' -'gofmt' '_go' -'gpasswd' '_gpasswd' -'gpaste' '_paste' -'gpatch' '_patch' -'gpg' '_gpg' -'gpg2' '_gpg' -'gpgv' '_gpg' -'gpg-zip' '_gpg' -'gphoto2' '_gphoto2' -'gprintenv' '_printenv' -'gprof' '_gprof' -'gqview' '_gqview' -'gradle' '_gradle' -'gradlew' '_gradle' -'grail' '_webbrowser' -'greadlink' '_readlink' -'grep' '_grep' -'grepdiff' '_patchutils' -'grep-excuses' '_grep-excuses' -'grm' '_rm' -'grmdir' '_rmdir' -'groff' '_groff' -'groupadd' '_user_admin' -'groupdel' '_groups' -'groupmod' '_user_admin' -'groups' '_users' -'growisofs' '_growisofs' -'gs' '_ghostscript' -'gsbj' '_pspdf' -'gsdj' '_pspdf' -'gsdj500' '_pspdf' -'gsed' '_sed' -'gseq' '_seq' -'gsettings' '_gsettings' -'gsha1sum' '_md5sum' -'gsha224sum' '_md5sum' -'gsha256sum' '_md5sum' -'gsha384sum' '_md5sum' -'gsha512sum' '_md5sum' -'gshred' '_shred' -'gshuf' '_shuf' -'gslj' '_pspdf' -'gslp' '_pspdf' -'gsnd' '_ghostscript' -'gsort' '_sort' -'gsplit' '_split' -'gstat' '_gstat' -'gstdbuf' '_stdbuf' -'gstrings' '_strings' -'gstty' '_stty' -'gsum' '_cksum' -'gtac' '_tac' -'gtail' '_tail' -'gtar' '_tar' -'gtee' '_tee' -'gtimeout' '_timeout' -'gtouch' '_touch' -'gtr' '_tr' -'gtty' '_tty' -'guilt' '_guilt' -'guilt-add' '_guilt' -'guilt-applied' '_guilt' -'guilt-delete' '_guilt' -'guilt-files' '_guilt' -'guilt-fold' '_guilt' -'guilt-fork' '_guilt' -'guilt-header' '_guilt' -'guilt-help' '_guilt' -'guilt-import' '_guilt' -'guilt-import-commit' '_guilt' -'guilt-init' '_guilt' -'guilt-new' '_guilt' -'guilt-next' '_guilt' -'guilt-patchbomb' '_guilt' -'guilt-pop' '_guilt' -'guilt-prev' '_guilt' -'guilt-push' '_guilt' -'guilt-rebase' '_guilt' -'guilt-refresh' '_guilt' -'guilt-rm' '_guilt' -'guilt-series' '_guilt' -'guilt-status' '_guilt' -'guilt-top' '_guilt' -'guilt-unapplied' '_guilt' -'guname' '_uname' -'gunexpand' '_unexpand' -'guniq' '_uniq' -'gunzip' '_gzip' -'guptime' '_uptime' -'gv' '_gv' -'gview' '_vim' -'gvim' '_vim' -'gvimdiff' '_vim' -'gwc' '_wc' -'gwho' '_who' -'gxargs' '_xargs' -'gzcat' '_gzip' -'gzegrep' '_grep' -'gzfgrep' '_grep' -'gzgrep' '_grep' -'gzilla' '_webbrowser' -'gzip' '_gzip' -'hash' '_hash' -'hd' '_hexdump' -'hdiutil' '_hdiutil' -'head' '_head' -'heat' '_openstack' -'hexdump' '_hexdump' -'hilite' '_precommand' -'histed' '_zed' -'history' '_fc' -'host' '_host' -'hostname' '_hostname' -'hostnamectl' '_hostnamectl' -'hotjava' '_webbrowser' -'htop' '_htop' -'hwinfo' '_hwinfo' -'hyprctl' '_hyprctl' -'hyprpm' '_hyprpm' -'iceweasel' '_mozilla' -'icombine' '_ispell' -'iconv' '_iconv' -'iconvconfig' '_iconvconfig' -'id' '_id' -'identify' '_imagemagick' -'ifconfig' '_ifconfig' -'ifdown' '_net_interfaces' -'iftop' '_iftop' -'ifup' '_net_interfaces' -'ijoin' '_ispell' -'import' '_imagemagick' -'inc' '_mh' -'includeres' '_psutils' -'inetadm' '_inetadm' -'info' '_texinfo' -'infocmp' '_terminals' -'initctl' '_initctl' -'initdb' '_postgresql' -'insmod' '_modutils' -'install' '_install' -'install-info' '_texinfo' -'installpkg' '_pkgtool' -'integer' '_typeset' -'interdiff' '_patchutils' -'invoke-rc.d' '_invoke-rc.d' -'ionice' '_ionice' -'iostat' '_iostat' -'ip' '_ip' -'ip6tables' '_iptables' -'ip6tables-restore' '_iptables' -'ip6tables-save' '_iptables' -'ipadm' '_ipadm' -'ipfw' '_ipfw' -'ipkg' '_opkg' -'ipsec' '_ipsec' -'ipset' '_ipset' -'iptables' '_iptables' -'iptables-restore' '_iptables' -'iptables-save' '_iptables' -'irb' '_ruby' -'ironic' '_openstack' -'irssi' '_irssi' -'isag' '_sysstat' -'ispell' '_ispell' -'iwconfig' '_iwconfig' -'jadetex' '_tex' -'jail' '_jail' -'jar' '_java' -'jarsigner' '_java' -'java' '_java' -'javac' '_java' -'javadoc' '_java' -'javah' '_java' -'javap' '_java' -'jdb' '_java' -'jexec' '_jexec' -'jls' '_jls' -'jobs' '_jobs_builtin' -'joe' '_joe' -'join' '_join' -'jot' '_jot' -'journalctl' '_journalctl' -'jq' '_jq' -'kdeconnect-cli' '_kdeconnect' -'kdump' '_kdump' -'keystone' '_openstack' -'keytool' '_java' -'kfmclient' '_kfmclient' -'kill' '_kill' -'killall' '_killall' -'killall5' '_killall' -'kioclient' '_kfmclient' -'kitty' '_kitty' -'kldload' '_kld' -'kldunload' '_kld' -'knock' '_knock' -'konqueror' '_webbrowser' -'kpartx' '_kpartx' -'kpdf' '_pdf' -'ksh' '_sh' -'ksh88' '_sh' -'ksh93' '_sh' -'ktrace' '_ktrace' -'kvno' '_kvno' -'last' '_last' -'lastb' '_last' -'latex' '_tex' -'latexmk' '_tex' -'ldap' '_ldap' -'ldapadd' '_openldap' -'ldapcompare' '_openldap' -'ldapdelete' '_openldap' -'ldapexop' '_openldap' -'ldapmodify' '_openldap' -'ldapmodrdn' '_openldap' -'ldappasswd' '_openldap' -'ldapsearch' '_openldap' -'ldapurl' '_openldap' -'ldapwhoami' '_openldap' -'ldconfig' '_ldconfig' -'ldconfig.real' '_ldconfig' -'ldd' '_ldd' -'less' '_less' -'let' '_math' -'lftp' '_ncftp' -'lha' '_lha' -'light' '_webbrowser' -'lighty-disable-mod' '_lighttpd' -'lighty-enable-mod' '_lighttpd' -'limit' '_limit' -'links' '_links' -'links2' '_links' -'lintian' '_lintian' -'lintian-info' '_lintian' -'linux' '_uml' -'lldb' '_lldb' -'llvm-g++' '_gcc' -'llvm-gcc' '_gcc' -'llvm-objdump' '_objdump' -'llvm-otool' '_otool' -'ln' '_ln' -'loadkeys' '_loadkeys' -'local' '_typeset' -'locale' '_locale' -'localectl' '_localectl' -'localedef' '_localedef' -'locate' '_locate' -'log' '_nothing' -'logger' '_logger' -'loginctl' '_loginctl' -'logname' '_nothing' -'look' '_look' -'losetup' '_losetup' -'lp' '_lp' -'lpadmin' '_lp' -'lpinfo' '_lp' -'lpoptions' '_lp' -'lpq' '_lp' -'lpr' '_lp' -'lprm' '_lp' -'lpstat' '_lp' -'ls' '_ls' -'lsattr' '_lsattr' -'lsblk' '_lsblk' -'lscfg' '_lscfg' -'lsd' '_lsd' -'lsdev' '_lsdev' -'lsdiff' '_patchutils' -'lslv' '_lslv' -'lsmod' '_modutils' -'lsns' '_lsns' -'lsof' '_lsof' -'lspv' '_lspv' -'lsusb' '_lsusb' -'lsvg' '_lsvg' -'ltrace' '_ltrace' -'lua' '_lua' -'lualatex' '_tex' -'luarocks' '_luarocks' -'lvchange' '_lvm2' -'lvconvert' '_lvm2' -'lvcreate' '_lvm2' -'lvdisplay' '_lvm2' -'lvextend' '_lvm2' -'lvm' '_lvm2' -'lvmconfig' '_lvm2' -'lvmdiskscan' '_lvm2' -'lvmdump' '_lvm2' -'lvreduce' '_lvm2' -'lvremove' '_lvm2' -'lvrename' '_lvm2' -'lvresize' '_lvm2' -'lvs' '_lvm2' -'lvscan' '_lvm2' -'lynx' '_lynx' -'lz4' '_lz4' -'lz4c' '_lz4' -'lz4c32' '_lz4' -'lz4cat' '_lz4' -'lzcat' '_xz' -'lzma' '_xz' -'lzop' '_lzop' -'m-a' '_module-assistant' -'mac2unix' '_dos2unix' -'machinectl' '_machinectl' -'madison' '_madison' -'magnum' '_openstack' -'mail' '_mail' -'Mail' '_mail' -'mailx' '_mail' -'make' '_make' -'makeinfo' '_texinfo' -'make-kpkg' '_make-kpkg' -'makepkg' '_pkgtool' -'man' '_man' -'manage.py' '_django' -'manila' '_openstack' -'mark' '_mh' -'mat' '_mat' -'mat2' '_mat2' -'matchpathcon' '_selinux' -'-math-' '_math' -'matlab' '_matlab' -'mattrib' '_mtools' -'mcd' '_mtools' -'mcopy' '_mtools' -'md2' '_cksum' -'md4' '_cksum' -'md5' '_cksum' -'md5sum' '_md5sum' -'mdadm' '_mdadm' -'mdel' '_mtools' -'mdeltree' '_mtools' -'mdfind' '_mdfind' -'mdir' '_mtools' -'mdls' '_mdls' -'mdo' '_mdo' -'mdu' '_mtools' -'mdutil' '_mdutil' -'members' '_members' -'mencal' '_mencal' -'mere' '_mere' -'merge' '_rcs' -'mergechanges' '_mergechanges' -'metaflac' '_flac' -'mformat' '_mtools' -'mgv' '_pspdf' -'mhfixmsg' '_mh' -'mhlist' '_mh' -'mhmail' '_mh' -'mhn' '_mh' -'mhparam' '_mh' -'mhpath' '_mh' -'mhshow' '_mh' -'mhstore' '_mh' -'mii-tool' '_mii-tool' -'mistral' '_openstack' -'mixerctl' '_mixerctl' -'mkdir' '_mkdir' -'mkfifo' '_mkfifo' -'mkisofs' '_growisofs' -'mknod' '_mknod' -'mksh' '_sh' -'mkshortcut' '_mkshortcut' -'mkshortcut.exe' '_mkshortcut' -'mktemp' '_mktemp' -'mktunes' '_gnupod' -'mktunes.pl' '_gnupod' -'mkzsh' '_mkzsh' -'mkzsh.exe' '_mkzsh' -'mlabel' '_mtools' -'mlocate' '_locate' -'mmd' '_mtools' -'mmm' '_webbrowser' -'mmount' '_mtools' -'mmove' '_mtools' -'modinfo' '_modutils' -'modprobe' '_modutils' -'module' '_module' -'module-assistant' '_module-assistant' -'mogrify' '_imagemagick' -'monasca' '_openstack' -'mondoarchive' '_mondo' -'montage' '_imagemagick' -'moosic' '_moosic' -'Mosaic' '_webbrowser' -'mosh' '_mosh' -'mount' '_mount' -'mozilla' '_mozilla' -'mozilla-firefox' '_mozilla' -'mozilla-xremote-client' '_mozilla' -'mpc' '_mpc' -'mplayer' '_mplayer' -'mpstat' '_sysstat' -'mpv' '_mpv' -'mr' '_myrepos' -'mrd' '_mtools' -'mread' '_mtools' -'mren' '_mtools' -'msgchk' '_mh' -'mt' '_mt' -'mtn' '_monotone' -'mtoolstest' '_mtools' -'mtr' '_mtr' -'mtype' '_mtools' -'munchlist' '_ispell' -'mupdf' '_mupdf' -'murano' '_openstack' -'mush' '_mail' -'mutt' '_mutt' -'mv' '_mv' -'mvim' '_vim' -'mx' '_hosts' -'mysql' '_mysql_utils' -'mysqladmin' '_mysql_utils' -'mysqldiff' '_mysqldiff' -'mysqldump' '_mysql_utils' -'mysqlimport' '_mysql_utils' -'mysqlshow' '_mysql_utils' -'nail' '_mail' -'nano' '_nano' -'native2ascii' '_java' -'nautilus' '_nautilus' -'nawk' '_awk' -'nc' '_netcat' -'ncal' '_cal' -'ncftp' '_ncftp' -'ncl' '_nedit' -'nedit' '_nedit' -'nedit-client' '_nedit' -'nedit-nc' '_nedit' -'neomutt' '_mutt' -'netcat' '_netcat' -'netrik' '_webbrowser' -'netscape' '_netscape' -'netstat' '_netstat' -'nettop' '_nettop' -'networkctl' '_networkctl' -'networksetup' '_networksetup' -'neutron' '_openstack' -'new' '_mh' -'newgrp' '_groups' -'newrole' '_selinux' -'next' '_mh' -'nginx' '_nginx' -'ngrep' '_ngrep' -'nice' '_nice' -'nix' '_nix' -'nix-build' '_nix-build' -'nix-channel' '_nix-channel' -'nix-collect-garbage' '_nix-collect-garbage' -'nix-copy-closure' '_nix-copy-closure' -'nix-env' '_nix-env' -'nix-hash' '_nix-hash' -'nix-install-package' '_nix-install-package' -'nix-instantiate' '_nix-instantiate' -'nixops' '_nixops' -'nixos-build-vms' '_nixos-build-vms' -'nixos-container' '_nixos-container' -'nixos-generate-config' '_nixos-generate-config' -'nixos-install' '_nixos-install' -'nixos-option' '_nixos-option' -'nixos-rebuild' '_nixos-rebuild' -'nixos-version' '_nixos-version' -'nix-prefetch-url' '_nix-prefetch-url' -'nix-push' '_nix-push' -'nix-shell' '_nix-shell' -'nix-store' '_nix-store' -'nkf' '_nkf' -'nl' '_nl' -'nm' '_nm' -'nmap' '_nmap' -'nmblookup' '_samba' -'nmcli' '_networkmanager' -'nocorrect' '_precommand' -'noglob' '_precommand' -'nohup' '_precommand' -'nova' '_openstack' -'npm' '_npm' -'ns' '_hosts' -'nsenter' '_nsenter' -'nslookup' '_nslookup' -'ntalk' '_other_accounts' -'numfmt' '_numfmt' -'nvim' '_vim' -'nvram' '_nvram' -'objdump' '_objdump' -'od' '_od' -'odme' '_object_classes' -'odmget' '_object_classes' -'odmshow' '_object_classes' -'ogg123' '_vorbis' -'oggdec' '_vorbis' -'oggenc' '_vorbis' -'ogginfo' '_vorbis' -'oksh' '_sh' -'okular' '_okular' -'oomctl' '_oomctl' -'open' '_open' -'opencode' '_opencode' -'openstack' '_openstack' -'opera' '_webbrowser' -'opera-next' '_webbrowser' -'opkg' '_opkg' -'opusdec' '_opustools' -'opusenc' '_opustools' -'opusinfo' '_opustools' -'osascript' '_osascript' -'osc' '_osc' -'otool' '_otool' -'p4' '_perforce' -'p4d' '_perforce' -'pack' '_pack' -'packf' '_mh' -'pandoc' '_pandoc' -'papers' '_papers' -'-parameter-' '_parameter' -'parsehdlist' '_urpmi' -'passwd' '_users' -'paste' '_paste' -'patch' '_patch' -'pax' '_pax' -'pbcopy' '_pbcopy' -'pbpaste' '_pbcopy' -'pbuilder' '_pbuilder' -'pcat' '_pack' -'pcp-htop' '_htop' -'pcred' '_pids' -'pdf2dsc' '_pdf' -'pdf2ps' '_pdf' -'pdffonts' '_pdf' -'pdfimages' '_pdf' -'pdfinfo' '_pdf' -'pdfjadetex' '_tex' -'pdflatex' '_tex' -'pdfopt' '_pdf' -'pdftex' '_tex' -'pdftexi2dvi' '_texinfo' -'pdftk' '_pdftk' -'pdftopbm' '_pdf' -'pdftops' '_pdf' -'pdftotext' '_pdf' -'pdksh' '_sh' -'perf' '_perf' -'perl' '_perl' -'perlbrew' '_perlbrew' -'perldoc' '_perldoc' -'pfctl' '_pfctl' -'pfexec' '_pfexec' -'pfiles' '_pids' -'pflags' '_pids' -'pg_config' '_postgresql' -'pg_ctl' '_postgresql' -'pg_dump' '_postgresql' -'pg_dumpall' '_postgresql' -'pg_isready' '_postgresql' -'pgrep' '_pgrep' -'pg_restore' '_postgresql' -'pg_upgrade' '_postgresql' -'php' '_php' -'pick' '_mh' -'picocom' '_picocom' -'pidof' '_pidof' -'pidstat' '_sysstat' -'pigz' '_gzip' -'pine' '_pine' -'pinef' '_pine' -'pinfo' '_texinfo' -'ping' '_ping' -'ping6' '_ping' -'piuparts' '_piuparts' -'pkg' '_pkg5' -'pkg_add' '_bsd_pkg' -'pkgadd' '_pkgadd' -'pkg-config' '_pkg-config' -'pkg_create' '_bsd_pkg' -'pkg_delete' '_bsd_pkg' -'pkgin' '_pkgin' -'pkg_info' '_bsd_pkg' -'pkginfo' '_pkginfo' -'pkgrm' '_pkgrm' -'pkgtool' '_pkgtool' -'pkill' '_pgrep' -'playerctl' '_playerctl' -'pldd' '_pids' -'plutil' '_plutil' -'pmake' '_make' -'pman' '_perl_modules' -'pmap' '_pmap' -'pmcat' '_perl_modules' -'pmdesc' '_perl_modules' -'pmeth' '_perl_modules' -'pmexp' '_perl_modules' -'pmfunc' '_perl_modules' -'pmload' '_perl_modules' -'pmls' '_perl_modules' -'pmpath' '_perl_modules' -'pmvers' '_perl_modules' -'podgrep' '_perl_modules' -'podpath' '_perl_modules' -'podtoc' '_perl_modules' -'poff' '_pon' -'policytool' '_java' -'pon' '_pon' -'popd' '_directory_stack' -'portaudit' '_portaudit' -'portlint' '_portlint' -'portmaster' '_portmaster' -'portsnap' '_portsnap' -'postconf' '_postfix' -'postgres' '_postgresql' -'postmaster' '_postgresql' -'postqueue' '_postfix' -'postsuper' '_postfix' -'powerd' '_powerd' -'pr' '_pr' -'prev' '_mh' -'print' '_print' -'printenv' '_printenv' -'printf' '_print' -'procstat' '_procstat' -'prompt' '_prompt' -'prove' '_prove' -'prstat' '_prstat' -'prun' '_pids' -'ps' '_ps' -'ps2ascii' '_pspdf' -'ps2epsi' '_postscript' -'ps2pdf' '_postscript' -'ps2pdf12' '_postscript' -'ps2pdf13' '_postscript' -'ps2pdf14' '_postscript' -'ps2pdfwr' '_postscript' -'ps2ps' '_postscript' -'psbook' '_psutils' -'pscp' '_pscp' -'pscp.exe' '_pscp' -'psed' '_sed' -'psig' '_pids' -'psmerge' '_psutils' -'psmulti' '_postscript' -'psnup' '_psutils' -'psql' '_postgresql' -'psresize' '_psutils' -'psselect' '_psutils' -'pstack' '_pids' -'pstoedit' '_pspdf' -'pstop' '_pids' -'pstops' '_psutils' -'pstotgif' '_pspdf' -'pswrap' '_postscript' -'ptree' '_ptree' -'ptx' '_ptx' -'pump' '_pump' -'pushd' '_cd' -'putclip' '_putclip' -'putclip.exe' '_putclip' -'pv' '_pv' -'pvchange' '_lvm2' -'pvck' '_lvm2' -'pvcreate' '_lvm2' -'pvdisplay' '_lvm2' -'pvmove' '_lvm2' -'pvremove' '_lvm2' -'pvresize' '_lvm2' -'pvs' '_lvm2' -'pvscan' '_lvm2' -'pwait' '_pids' -'pwdx' '_pids' -'pwgen' '_pwgen' -'pyhtmlizer' '_twisted' -'qdbus' '_qdbus' -'qiv' '_qiv' -'qtplay' '_qtplay' -'querybts' '_bug' -'quilt' '_quilt' -'r' '_fc' -'rake' '_rake' -'ranlib' '_ranlib' -'rar' '_rar' -'rc' '_sh' -'rcctl' '_rcctl' -'rclone' '_rclone' -'rcp' '_rlogin' -'rcs' '_rcs' -'rcsdiff' '_rcs' -'rdesktop' '_rdesktop' -'read' '_read' -'readelf' '_readelf' -'readlink' '_readlink' -'readonly' '_typeset' -'readshortcut' '_readshortcut' -'readshortcut.exe' '_readshortcut' -'rebootin' '_rebootin' -'-redirect-' '_redirect' -'-redirect-,<,bunzip2' '_bzip2' -'-redirect-,<,bzip2' '_bzip2' -'-redirect-,>,bzip2' '_bzip2' -'-redirect-,<,compress' '_compress' -'-redirect-,>,compress' '_compress' -'-redirect-,-default-,-default-' '_files' -'-redirect-,<,gunzip' '_gzip' -'-redirect-,<,gzip' '_gzip' -'-redirect-,>,gzip' '_gzip' -'-redirect-,<,uncompress' '_compress' -'-redirect-,<,unxz' '_xz' -'-redirect-,<,unzstd' '_zstd' -'-redirect-,<,xz' '_xz' -'-redirect-,>,xz' '_xz' -'-redirect-,<,zstd' '_zstd' -'-redirect-,>,zstd' '_zstd' -'refile' '_mh' -'rehash' '_hash' -'reindexdb' '_postgresql' -'reload' '_initctl' -'removepkg' '_pkgtool' -'remsh' '_rlogin' -'renice' '_renice' -'repl' '_mh' -'reportbug' '_bug' -'reprepro' '_reprepro' -'resolvectl' '_resolvectl' -'restart' '_initctl' -'restorecon' '_selinux' -'retawq' '_webbrowser' -'rg' '_rg' -'rgrep' '_grep' -'rgview' '_vim' -'rgvim' '_vim' -'ri' '_ri' -'rlogin' '_rlogin' -'rm' '_rm' -'rmadison' '_madison' -'rmd160' '_cksum' -'rmdir' '_rmdir' -'rmf' '_mh' -'rmic' '_java' -'rmid' '_java' -'rmiregistry' '_java' -'rmm' '_mh' -'rmmod' '_modutils' -'rnano' '_nano' -'route' '_route' -'rpm' '_rpm' -'rpmbuild' '_rpm' -'rpmkeys' '_rpm' -'rpmquery' '_rpm' -'rpmsign' '_rpm' -'rpmspec' '_rpm' -'rpmverify' '_rpm' -'rrdtool' '_rrdtool' -'rsh' '_rlogin' -'rsvg-convert' '_rsvg-convert' -'rsync' '_rsync' -'rtin' '_tin' -'rubber' '_rubber' -'rubber-info' '_rubber' -'rubber-pipe' '_rubber' -'ruby' '_ruby' -'ruby-mri' '_ruby' -'run0' '_run0' -'runcon' '_selinux' -'run-help' '_run-help' -'rup' '_hosts' -'rusage' '_precommand' -'rview' '_vim' -'rvim' '_vim' -'rwho' '_hosts' -'rxvt' '_urxvt' -'s2p' '_sed' -'sadf' '_sysstat' -'sahara' '_openstack' -'sar' '_sysstat' -'savecore' '_savecore' -'say' '_say' -'sbuild' '_sbuild' -'scan' '_mh' -'sccs' '_sccs' -'sccsdiff' '_sccs' -'sched' '_sched' -'schedtool' '_schedtool' -'schroot' '_schroot' -'scl' '_scl' -'scons' '_scons' -'scp' '_ssh' -'screen' '_screen' -'script' '_script' -'scriptreplay' '_script' -'scselect' '_scselect' -'sc_usage' '_sc_usage' -'scutil' '_scutil' -'seaf-cli' '_seafile' -'sealert' '_selinux' -'secon' '_selinux' -'sed' '_sed' -'sedismod' '_selinux' -'sedta' '_selinux' -'seinfo' '_selinux' -'selinuxconlist' '_selinux' -'selinuxdefcon' '_selinux' -'selinuxexeccon' '_selinux' -'semanage' '_selinux' -'semodule' '_selinux' -'semodule_unpackage' '_selinux' -'senlin' '_openstack' -'sepolgen' '_selinux' -'sepolicy' '_selinux' -'seq' '_seq' -'serialver' '_java' -'service' '_service' -'sesearch' '_selinux' -'sestatus' '_selinux' -'set' '_set' -'setenforce' '_selinux' -'setfacl' '_setfacl' -'setfacl.exe' '_setfacl' -'setfattr' '_attr' -'setopt' '_setopt' -'setpriv' '_setpriv' -'setsebool' '_selinux' -'setsid' '_setsid' -'setxkbmap' '_setxkbmap' -'sftp' '_ssh' -'sh' '_sh' -'sha1' '_cksum' -'sha1sum' '_md5sum' -'sha224sum' '_md5sum' -'sha256' '_cksum' -'sha256sum' '_md5sum' -'sha384' '_cksum' -'sha384sum' '_md5sum' -'sha512' '_cksum' -'sha512sum' '_md5sum' -'sha512t256' '_cksum' -'shasum' '_shasum' -'shift' '_arrays' -'shortcuts' '_shortcuts' -'show' '_mh' -'showchar' '_psutils' -'showmount' '_showmount' -'shred' '_shred' -'shuf' '_shuf' -'shutdown' '_shutdown' -'signify' '_signify' -'sioyek' '_sioyek' -'sisu' '_sisu' -'skein1024' '_cksum' -'skein256' '_cksum' -'skein512' '_cksum' -'skipstone' '_webbrowser' -'slabtop' '_slabtop' -'slitex' '_tex' -'slocate' '_locate' -'slogin' '_ssh' -'slrn' '_slrn' -'smartctl' '_smartmontools' -'smbclient' '_samba' -'smbcontrol' '_samba' -'smbstatus' '_samba' -'smit' '_smit' -'smitty' '_smit' -'snoop' '_snoop' -'soa' '_hosts' -'socket' '_socket' -'sockstat' '_sockstat' -'softwareupdate' '_softwareupdate' -'sort' '_sort' -'sortm' '_mh' -'source' '_source' -'spamassassin' '_spamassassin' -'split' '_split' -'splitdiff' '_patchutils' -'sqlite' '_sqlite' -'sqlite3' '_sqlite' -'sqsh' '_sqsh' -'sr' '_surfraw' -'srptool' '_gnutls' -'ss' '_ss' -'ssh' '_ssh' -'ssh-add' '_ssh' -'ssh-agent' '_ssh' -'ssh-copy-id' '_ssh' -'sshfs' '_sshfs' -'ssh-keygen' '_ssh' -'ssh-keyscan' '_ssh' -'star' '_tar' -'start' '_initctl' -'stat' '_stat' -'status' '_initctl' -'stdbuf' '_stdbuf' -'stop' '_initctl' -'stow' '_stow' -'strace' '_strace' -'strace64' '_strace' -'strftime' '_strftime' -'strings' '_strings' -'strip' '_strip' -'strongswan' '_ipsec' -'stty' '_stty' -'su' '_su' -'subl' '_sublimetext' -'-subscript-' '_subscript' -'sudo' '_sudo' -'sudoedit' '_sudo' -'sum' '_cksum' -'surfraw' '_surfraw' -'SuSEconfig' '_SUSEconfig' -'sv' '_runit' -'svcadm' '_svcadm' -'svccfg' '_svccfg' -'svcprop' '_svcprop' -'svcs' '_svcs' -'svn' '_subversion' -'svnadmin' '_subversion' -'svnadmin-static' '_subversion' -'svn-buildpackage' '_svn-buildpackage' -'svnlite' '_subversion' -'svnliteadmin' '_subversion' -'swaks' '_swaks' -'swanctl' '_swanctl' -'swift' '_swift' -'swiftc' '_swift' -'sw_vers' '_sw_vers' -'sync' '_nothing' -'sysclean' '_sysclean' -'sysctl' '_sysctl' -'sysmerge' '_sysmerge' -'syspatch' '_syspatch' -'sysrc' '_sysrc' -'systat' '_systat' -'systemctl' '_systemctl' -'systemd-analyze' '_systemd-analyze' -'systemd-ask-password' '_systemd' -'systemd-cat' '_systemd' -'systemd-cgls' '_systemd' -'systemd-cgtop' '_systemd' -'systemd-delta' '_systemd-delta' -'systemd-detect-virt' '_systemd' -'systemd-id128' '_systemd-id128' -'systemd-inhibit' '_systemd-inhibit' -'systemd-machine-id-setup' '_systemd' -'systemd-notify' '_systemd' -'systemd-nspawn' '_systemd-nspawn' -'systemd-path' '_systemd-path' -'systemd-resolve' '_resolvectl' -'systemd-run' '_systemd-run' -'systemd-tmpfiles' '_systemd-tmpfiles' -'systemd-tty-ask-password-agent' '_systemd' -'system_profiler' '_system_profiler' -'sysupgrade' '_sysupgrade' -'tac' '_tac' -'tacker' '_openstack' -'tail' '_tail' -'tailscale' '_tailscale' -'talk' '_other_accounts' -'tar' '_tar' -'tardy' '_tardy' -'tcpdump' '_tcpdump' -'tcp_open' '_tcpsys' -'tcptraceroute' '_tcptraceroute' -'tcsh' '_sh' -'tda' '_devtodo' -'tdd' '_devtodo' -'tde' '_devtodo' -'tdr' '_devtodo' -'tee' '_tee' -'telnet' '_telnet' -'tex' '_tex' -'texi2any' '_texinfo' -'texi2dvi' '_texinfo' -'texi2pdf' '_texinfo' -'texindex' '_texinfo' -'tg' '_topgit' -'tidy' '_tidy' -'tig' '_git' -'-tilde-' '_tilde' -'time' '_precommand' -'timedatectl' '_timedatectl' -'timeout' '_timeout' -'times' '_nothing' -'tin' '_tin' -'tkconch' '_twisted' -'tkinfo' '_texinfo' -'tla' '_tla' -'tload' '_tload' -'tmux' '_tmux' -'todo' '_devtodo' -'todo.sh' '_todo.sh' -'toilet' '_toilet' -'top' '_top' -'totdconfig' '_totd' -'touch' '_touch' -'tpb' '_tpb' -'tpkg-debarch' '_toolchain-source' -'tpkg-install' '_toolchain-source' -'tpkg-install-libc' '_toolchain-source' -'tpkg-make' '_toolchain-source' -'tpkg-update' '_toolchain-source' -'tput' '_tput' -'tr' '_tr' -'tracepath' '_tracepath' -'tracepath6' '_tracepath' -'traceroute' '_hosts' -'transmission-remote' '_transmission' -'trap' '_trap' -'trash' '_trash' -'tree' '_tree' -'trial' '_twisted' -'trove' '_openstack' -'true' '_nothing' -'truncate' '_truncate' -'truss' '_truss' -'tryaffix' '_ispell' -'tty' '_tty' -'ttyctl' '_ttyctl' -'tunctl' '_uml' -'tune2fs' '_tune2fs' -'tunes2pod' '_gnupod' -'tunes2pod.pl' '_gnupod' -'twidge' '_twidge' -'twist' '_twisted' -'twistd' '_twisted' -'txt' '_hosts' -'type' '_which' -'typeset' '_typeset' -'udevadm' '_udevadm' -'udisksctl' '_udisks2' -'ulimit' '_ulimit' -'uml_mconsole' '_uml' -'uml_moo' '_uml' -'uml_switch' '_uml' -'umount' '_mount' -'unace' '_unace' -'unalias' '_aliases' -'uname' '_uname' -'uncompress' '_compress' -'unexpand' '_unexpand' -'unfunction' '_functions' -'unhash' '_unhash' -'uniq' '_uniq' -'unison' '_unison' -'units' '_units' -'unix2dos' '_dos2unix' -'unix2mac' '_dos2unix' -'unlimit' '_limits' -'unlz4' '_lz4' -'unlzma' '_xz' -'unpack' '_pack' -'unpigz' '_gzip' -'unrar' '_rar' -'unset' '_vars' -'unsetopt' '_setopt' -'unshare' '_unshare' -'unwrapdiff' '_patchutils' -'unxz' '_xz' -'unzip' '_zip' -'unzstd' '_zstd' -'update-alternatives' '_update-alternatives' -'update-rc.d' '_update-rc.d' -'upgradepkg' '_pkgtool' -'upower' '_upower' -'uptime' '_uptime' -'urpme' '_urpmi' -'urpmf' '_urpmi' -'urpmi' '_urpmi' -'urpmi.addmedia' '_urpmi' -'urpmi.removemedia' '_urpmi' -'urpmi.update' '_urpmi' -'urpmq' '_urpmi' -'urxvt' '_urxvt' -'urxvt256c' '_urxvt' -'urxvt256cc' '_urxvt' -'urxvt256c-ml' '_urxvt' -'urxvt256c-mlc' '_urxvt' -'urxvtc' '_urxvt' -'usbconfig' '_usbconfig' -'uscan' '_uscan' -'useradd' '_user_admin' -'userdbctl' '_userdbctl' -'userdel' '_users' -'usermod' '_user_admin' -'vacuumdb' '_postgresql' -'valgrind' '_valgrind' -'validatetrans' '_selinux' -'-value-' '_value' -'-value-,ADB_TRACE,-default-' '_adb' -'-value-,ANDROID_LOG_TAGS,-default-' '_adb' -'-value-,ANDROID_SERIAL,-default-' '_adb' -'-value-,ANSIBLE_INVENTORY_ENABLED,-default-' '_ansible' -'-value-,ANSIBLE_STDOUT_CALLBACK,-default-' '_ansible' -'-value-,ANT_ARGS,-default-' '_ant' -'-value-,CFLAGS,-default-' '_gcc' -'-value-,CPPFLAGS,-default-' '_gcc' -'-value-,CXXFLAGS,-default-' '_gcc' -'-value-,DBUS_SESSION_BUS_ADDRESS,-default-' '_sd_bus_address' -'-value-,DBUS_SYSTEM_BUS_ADDRESS,-default-' '_sd_bus_address' -'-value-,-default-,-command-' '_zargs' -'-value-,-default-,-default-' '_value' -'-value-,DISPLAY,-default-' '_x_display' -'-value-,GREP_OPTIONS,-default-' '_grep' -'-value-,GZIP,-default-' '_gzip' -'-value-,LANG,-default-' '_locales' -'-value-,LANGUAGE,-default-' '_locales' -'-value-,LD_DEBUG,-default-' '_ld_debug' -'-value-,LDFLAGS,-default-' '_gcc' -'-value-,LESSCHARSET,-default-' '_less' -'-value-,LESS,-default-' '_less' -'-value-,LOOPDEV_DEBUG,-default-' '_losetup' -'-value-,LPDEST,-default-' '_printers' -'-value-,MPD_HOST,-default' '_mpc' -'-value-,P4CLIENT,-default-' '_perforce' -'-value-,P4MERGE,-default-' '_perforce' -'-value-,P4PORT,-default-' '_perforce' -'-value-,P4USER,-default-' '_perforce' -'-value-,PERLDOC,-default-' '_perldoc' -'-value-,PRINTER,-default-' '_printers' -'-value-,PROMPT2,-default-' '_ps1234' -'-value-,PROMPT3,-default-' '_ps1234' -'-value-,PROMPT4,-default-' '_ps1234' -'-value-,PROMPT,-default-' '_ps1234' -'-value-,PS1,-default-' '_ps1234' -'-value-,PS2,-default-' '_ps1234' -'-value-,PS3,-default-' '_ps1234' -'-value-,PS4,-default-' '_ps1234' -'-value-,RPROMPT2,-default-' '_ps1234' -'-value-,RPROMPT,-default-' '_ps1234' -'-value-,RPS1,-default-' '_ps1234' -'-value-,RPS2,-default-' '_ps1234' -'-value-,SPROMPT,-default-' '_ps1234' -'-value-,TERM,-default-' '_terminals' -'-value-,TERMINFO_DIRS,-default-' '_dir_list' -'-value-,TZ,-default-' '_time_zone' -'-value-,VALGRIND_OPTS,-default-' '_valgrind' -'-value-,WWW_HOME,-default-' '_urls' -'-value-,XML_CATALOG_FILES,-default-' '_xmlsoft' -'-value-,XZ_DEFAULTS,-default-' '_xz' -'-value-,XZ_OPT,-default-' '_xz' -'-vared-' '_in_vared' -'vared' '_vared' -'varlinkctl' '_varlinkctl' -'vcs_info_hookadd' '_vcs_info' -'vcs_info_hookdel' '_vcs_info' -'vgcfgbackup' '_lvm2' -'vgcfgrestore' '_lvm2' -'vgchange' '_lvm2' -'vgck' '_lvm2' -'vgconvert' '_lvm2' -'vgcreate' '_lvm2' -'vgdisplay' '_lvm2' -'vgexport' '_lvm2' -'vgextend' '_lvm2' -'vgimport' '_lvm2' -'vgimportclone' '_lvm2' -'vgmerge' '_lvm2' -'vgmknodes' '_lvm2' -'vgreduce' '_lvm2' -'vgremove' '_lvm2' -'vgrename' '_lvm2' -'vgs' '_lvm2' -'vgscan' '_lvm2' -'vgsplit' '_lvm2' -'vi' '_vi' -'view' '_vi' -'vim' '_vim' -'vim-addons' '_vim-addons' -'vimdiff' '_vim' -'virsh' '_libvirt' -'virt-admin' '_libvirt' -'virt-host-validate' '_libvirt' -'virt-pki-validate' '_libvirt' -'virt-xml-validate' '_libvirt' -'visudo' '_visudo' -'vitrage' '_openstack' -'vmctl' '_vmctl' -'vmstat' '_vmstat' -'vncserver' '_vnc' -'vncviewer' '_vnc' -'vorbiscomment' '_vorbis' -'vpnc' '_vpnc' -'vpnc-connect' '_vpnc' -'vserver' '_vserver' -'w' '_w' -'w3m' '_w3m' -'wait' '_wait' -'wajig' '_wajig' -'watch' '_watch' -'watcher' '_openstack' -'wc' '_wc' -'wget' '_wget' -'whatis' '_man' -'whence' '_which' -'where' '_which' -'whereis' '_whereis' -'which' '_which' -'which-pkg-broke' '_which-pkg-broke' -'who' '_who' -'whoami' '_nothing' -'whois' '_whois' -'whom' '_mh' -'wiggle' '_wiggle' -'wipefs' '_wipefs' -'wl-copy' '_wl-copy' -'wlogout' '_wlogout' -'wl-paste' '_wl-paste' -'wodim' '_cdrecord' -'wpa_cli' '_wpa_cli' -'wpaperctl' '_wpaperctl' -'wpaperd' '_wpaperd' -'wpctl' '_wpctl' -'write' '_users_on' -'www' '_webbrowser' -'xargs' '_xargs' -'xattr' '_attr' -'xauth' '_xauth' -'xautolock' '_xautolock' -'xclip' '_xclip' -'xcode-select' '_xcode-select' -'xdpyinfo' '_x_utils' -'xdvi' '_xdvi' -'xelatex' '_tex' -'xetex' '_tex' -'xev' '_x_utils' -'xfconf-query' '_xfconf-query' -'xfd' '_x_utils' -'xfig' '_xfig' -'xfontsel' '_x_utils' -'xfreerdp' '_rdesktop' -'xhost' '_x_utils' -'xinput' '_xinput' -'xkill' '_x_utils' -'xli' '_xloadimage' -'xloadimage' '_xloadimage' -'xlsatoms' '_x_utils' -'xlsclients' '_x_utils' -'xml' '_xmlstarlet' -'xmllint' '_xmlsoft' -'xmlstarlet' '_xmlstarlet' -'xmms2' '_xmms2' -'xmodmap' '_xmodmap' -'xmosaic' '_webbrowser' -'xon' '_x_utils' -'xournal' '_xournal' -'xpdf' '_xpdf' -'xping' '_hosts' -'xprop' '_x_utils' -'xrandr' '_xrandr' -'xrdb' '_x_utils' -'xscreensaver-command' '_xscreensaver' -'xset' '_xset' -'xsetbg' '_xloadimage' -'xsetroot' '_x_utils' -'xsltproc' '_xmlsoft' -'xterm' '_xterm' -'xtightvncviewer' '_vnc' -'xtp' '_imagemagick' -'xv' '_xv' -'xview' '_xloadimage' -'xvnc4viewer' '_vnc' -'xvncviewer' '_vnc' -'xwd' '_x_utils' -'xwininfo' '_x_utils' -'xwit' '_xwit' -'xwud' '_x_utils' -'xxd' '_xxd' -'xz' '_xz' -'xzcat' '_xz' -'yafc' '_yafc' -'yash' '_sh' -'yast' '_yast' -'yast2' '_yast' -'ypbind' '_yp' -'ypcat' '_yp' -'ypmatch' '_yp' -'yppasswd' '_yp' -'yppoll' '_yp' -'yppush' '_yp' -'ypserv' '_yp' -'ypset' '_yp' -'ypwhich' '_yp' -'ypxfr' '_yp' -'ytalk' '_other_accounts' -'yum' '_yum' -'yumdb' '_yum' -'zargs' '_zargs' -'zcalc' '_zcalc' -'-zcalc-line-' '_zcalc_line' -'zcat' '_zcat' -'zcompile' '_zcompile' -'zcp' '_zmv' -'zdb' '_zfs' -'zdelattr' '_zattr' -'zdump' '_zdump' -'zeal' '_zeal' -'zed' '_zed' -'zegrep' '_grep' -'zen' '_webbrowser' -'zf_chgrp' '_chown' -'zf_chmod' '_chmod' -'zf_chown' '_chown' -'zfgrep' '_grep' -'zf_ln' '_ln' -'zf_mkdir' '_mkdir' -'zf_mv' '_mv' -'zf_rm' '_rm' -'zf_rmdir' '_rmdir' -'zfs' '_zfs' -'zgetattr' '_zattr' -'zgrep' '_grep' -'zip' '_zip' -'zipinfo' '_zip' -'zle' '_zle' -'zlistattr' '_zattr' -'zln' '_zmv' -'zlogin' '_zlogin' -'zmail' '_mail' -'zmodload' '_zmodload' -'zmv' '_zmv' -'zone' '_hosts' -'zoneadm' '_zoneadm' -'zparseopts' '_zparseopts' -'zpool' '_zfs' -'zpty' '_zpty' -'zsetattr' '_zattr' -'zsh' '_zsh' -'zsh-mime-handler' '_zsh-mime-handler' -'zsocket' '_zsocket' -'zstat' '_stat' -'zstd' '_zstd' -'zstdcat' '_zstd' -'zstdmt' '_zstd' -'zstream' '_zfs' -'zstyle' '_zstyle' -'ztodo' '_ztodo' -'zun' '_openstack' -'zxpdf' '_xpdf' -'zypper' '_zypper' -) - -_services=( -'bzcat' 'bunzip2' -'dch' 'debchange' -'gchgrp' 'chgrp' -'gchown' 'chown' -'gnupod_addsong.pl' 'gnupod_addsong' -'gnupod_check.pl' 'gnupod_check' -'gnupod_INIT.pl' 'gnupod_INIT' -'gnupod_search.pl' 'gnupod_search' -'gpg2' 'gpg' -'gzcat' 'gunzip' -'iceweasel' 'firefox' -'lzcat' 'unxz' -'lzma' 'xz' -'Mail' 'mail' -'mailx' 'mail' -'mktunes.pl' 'mktunes' -'nail' 'mail' -'ncl' 'nc' -'nedit-client' 'nc' -'nedit-nc' 'nc' -'pcat' 'unpack' -'-redirect-,<,bunzip2' 'bunzip2' -'-redirect-,<,bzip2' 'bzip2' -'-redirect-,>,bzip2' 'bunzip2' -'-redirect-,<,compress' 'compress' -'-redirect-,>,compress' 'uncompress' -'-redirect-,<,gunzip' 'gunzip' -'-redirect-,<,gzip' 'gzip' -'-redirect-,>,gzip' 'gunzip' -'-redirect-,<,uncompress' 'uncompress' -'-redirect-,<,unxz' 'unxz' -'-redirect-,<,unzstd' 'unzstd' -'-redirect-,<,xz' 'xz' -'-redirect-,>,xz' 'unxz' -'-redirect-,<,zstd' 'zstd' -'-redirect-,>,zstd' 'unzstd' -'remsh' 'rsh' -'slogin' 'ssh' -'svnadmin-static' 'svnadmin' -'svnlite' 'svn' -'svnliteadmin' 'svnadmin' -'tunes2pod.pl' 'tunes2pod' -'unlzma' 'unxz' -'xelatex' 'latex' -'xetex' 'tex' -'xzcat' 'unxz' -'zf_chgrp' 'chgrp' -'zf_chown' 'chown' -) - -_patcomps=( -'*/(init|rc[0-9S]#).d/*' '_init_d' -) - -_postpatcomps=( -'_*' '_compadd' -'c++-*' '_gcc' -'g++-*' '_gcc' -'gcc-*' '_gcc' -'gem[0-9.]#' '_gem' -'lua[0-9.-]##' '_lua' -'(p[bgpn]m*|*top[bgpn]m)' '_pbm' -'php[0-9.-]' '_php' -'pip[0-9.]#' '_pip' -'pydoc[0-9.]#' '_pydoc' -'python[0-9.]#' '_python' -'qemu(|-system-*)' '_qemu' -'(ruby|[ei]rb)[0-9.]#' '_ruby' -'shasum(|5).*' '_shasum' -'(texi(2*|ndex))' '_texi' -'(tiff*|*2tiff|pal2rgb)' '_tiff' -'-value-,(ftp|http(|s))_proxy,-default-' '_urls' -'-value-,LC_*,-default-' '_locales' -'-value-,*path,-default-' '_directories' -'-value-,*PATH,-default-' '_dir_list' -'-value-,RUBY(LIB|OPT|PATH),-default-' '_ruby' -'*/X11(|R<4->)/*' '_x_arguments' -'yodl(|2*)' '_yodl' -'zf*' '_zftp' -) - -_compautos=( -'_call_program' '+X' -) - -zle -C _bash_complete-word .complete-word _bash_completions -zle -C _bash_list-choices .list-choices _bash_completions -zle -C _complete_debug .complete-word _complete_debug -zle -C _complete_help .complete-word _complete_help -zle -C _complete_tag .complete-word _complete_tag -zle -C _correct_filename .complete-word _correct_filename -zle -C _correct_word .complete-word _correct_word -zle -C _expand_alias .complete-word _expand_alias -zle -C _expand_word .complete-word _expand_word -zle -C _history-complete-newer .complete-word _history_complete_word -zle -C _history-complete-older .complete-word _history_complete_word -zle -C _list_expansions .list-choices _expand_word -zle -C _most_recent_file .complete-word _most_recent_file -zle -C _next_tags .list-choices _next_tags -zle -C _read_comp .complete-word _read_comp -bindkey '^X^R' _read_comp -bindkey '^X?' _complete_debug -bindkey '^XC' _correct_filename -bindkey '^Xa' _expand_alias -bindkey '^Xc' _correct_word -bindkey '^Xd' _list_expansions -bindkey '^Xe' _expand_word -bindkey '^Xh' _complete_help -bindkey '^Xm' _most_recent_file -bindkey '^Xn' _next_tags -bindkey '^Xt' _complete_tag -bindkey '^X~' _bash_list-choices -bindkey '^[,' _history-complete-newer -bindkey '^[/' _history-complete-older -bindkey '^[~' _bash_complete-word - -autoload -Uz _bun _bat _devenv _docker _dunst \ - _dunstctl _dunstify _fastfetch _kitty _lsd \ - _mpv _opencode _playerctl _rg _tailscale \ - _wl-copy _wlogout _wl-paste _wpaperctl _wpaperd \ - _bluetoothctl _bootctl _busctl _coredumpctl _docker \ - _hostnamectl _hyprctl _hyprpm _journalctl _localectl \ - _loginctl _machinectl _networkctl _nix _nix-build \ - _nix-channel _nix-collect-garbage _nix-common-options _nix-copy-closure _nix-env \ - _nix-hash _nix-install-package _nix-instantiate _nixops _nixos-build-vms \ - _nixos-container _nixos-generate-config _nixos-install _nixos-option _nixos-rebuild \ - _nixos-version _nix-prefetch-url _nix-push _nix-shell _nix-store \ - _oomctl _resolvectl _rsvg-convert _run0 _sd_bus_address \ - _sd_hosts_or_user_at_host _sd_machines _sd_outputmodes _sd_unit_files _systemctl \ - _systemd _systemd-analyze _systemd-delta _systemd-id128 _systemd-inhibit \ - _systemd-nspawn _systemd-path _systemd-run _systemd-tmpfiles _tailscale \ - _timedatectl _udevadm _udisks2 _upower _userdbctl \ - _varlinkctl _wpctl _7zip _a2ps _a2utils \ - _aap _abcde _absolute_command_paths _ack _acpi \ - _acpiconf _acpitool _acroread _adb _add-zle-hook-widget \ - _add-zsh-hook _alias _aliases _all_labels _all_matches \ - _alsa-utils _alternative _analyseplugin _ansible _ant \ - _antiword _apachectl _apm _approximate _apt \ - _apt-file _aptitude _apt-move _apt-show-versions _arch_archives \ - _arch_namespace _arg_compile __arguments _arguments _arp \ - _arping _arrays _asciidoctor _asciinema _as_if \ - _assign _at _attr _augeas _auto-apt \ - _autocd _avahi _awk _axi-cache _base64 \ - _basename _basenc _bash _bash_completions _baudrates \ - _baz _beadm _bectl _beep _be_name \ - _bibtex _bind_addresses _bindkey _bison _bittorrent \ - _blkid _bogofilter _bpf_filters _bpython _brace_parameter \ - _brctl _bsdconfig _bsd_disks _bsdinstall _bsd_pkg \ - _btrfs _bts _bug _builtin _bzip2 \ - _bzr _cabal _cacaclock _cache_invalid _caffeinate \ - _cal _calendar _call_function _canonical_paths _capabilities \ - _cat _ccal _cd _cdbs-edit-patch _cdcd \ - _cdr _cdrdao _cdrecord _chattr _chdman \ - _chflags _chkconfig _chmod _choom _chown \ - _chroot _chrt _chsh _cksum _clay \ - _cmdambivalent _cmdstring _cmp _code _col \ - _column _combination _comm _command _command_names \ - _compadd _compdef _compinit _complete _complete_debug \ - _complete_help _complete_help_generic _completers _complete_tag _comp_locale \ - _composer _compress _condition _configure _coreadm \ - _correct _correct_filename _correct_word _cowsay _cp \ - _cpio _cplay _cpupower _crontab _cryptsetup \ - _cscope _csplit _cssh _csup _ctags \ - _ctags_tags _cu _curl _cut _cvs \ - _cvsup _cygcheck _cygpath _cygrunsrv _cygserver \ - _cygstart _dak _darcs _date _date_formats \ - _dates _dbus _dchroot _dchroot-dsa _dconf \ - _dcop _dcut _dd _deb_architectures _debbugs_bugnumber \ - _debchange _debcheckout _deb_codenames _debdiff _deb_files \ - _debfoster _debmany _deborphan _deb_packages _debsign \ - _debsnap _debuild _default _defaults _delimiters \ - _describe _description _devtodo _df _dhclient \ - _dhcpinfo _dhomepage _dict _dict_words _diff \ - _diff3 _diff_options _diffstat _dig _directories \ - _directory_stack _dir_list _dirs _disable _dispatch \ - _django _dladm _dlocate _dmesg _dmidecode \ - _dnf _dnf5 _dns_types _doas _domains \ - _dos2unix _dpatch-edit-patch _dpkg _dpkg-buildpackage _dpkg-cross \ - _dpkg-info _dpkg-repack _dpkg_source _dput _drill \ - _dropbox _dscverify _dsh _dtrace _dtruss \ - _du _dumpadm _dumper _dupload _dvi \ - _dynamic_directory_name _e2label _ecasound _echo _echotc \ - _echoti _ed _elfdump _elinks _email_addresses \ - _emulate _enable _enscript _entr _env \ - _eog _equal _espeak _etags _ethtool \ - _evince _exec _expand _expand_alias _expand_word \ - _extensions _external_pwds _fakeroot _fbsd_architectures _fbsd_device_types \ - _fc _feh _fetch _fetchmail _ffmpeg \ - _figlet _file_descriptors _file_flags _file_modes _files \ - _file_systems _find _findmnt _find_net_interfaces _finger \ - _fink _first _fish _flac _flex \ - _floppy _flowadm _fmadm _fmt _fold \ - _fortune _free _freebsd-update _fsh _fstat \ - _fs_usage _functions _fuse_arguments _fuser _fusermount \ - _fuse_values _fw_update _gcc _gcore _gdb \ - _geany _gem _generic _genisoimage _getclip \ - _getconf _getent _getfacl _getmail _getopt \ - _ghostscript _git _git-buildpackage _global _global_tags \ - _globflags _globqual_delims _globquals _gnome-gv _gnu_generic \ - _gnupod _gnutls _go _gpasswd _gpg \ - _gphoto2 _gprof _gqview _gradle _graphicsmagick \ - _grep _grep-excuses _groff _groups _growisofs \ - _gsettings _gstat _guard _guilt _gv \ - _gzip _hash _have_glob_qual _hdiutil _head \ - _hexdump _history _history_complete_word _history_modifiers _host \ - _hostname _hosts _htop _hwinfo _iconv \ - _iconvconfig _id _ifconfig _iftop _ignored \ - _imagemagick _inetadm _initctl _init_d _install \ - _in_vared _invoke-rc.d _ionice _iostat _ip \ - _ipadm _ipfw _ipsec _ipset _iptables \ - _irssi _ispell _iwconfig _jail _jails \ - _java _java_class _jexec _jls _jobs \ - _jobs_bg _jobs_builtin _jobs_fg _joe _join \ - _jot _jq _kdeconnect _kdump _kfmclient \ - _kill _killall _kld _knock _kpartx \ - _ktrace _ktrace_points _kvno _last _ldap \ - _ldap_attributes _ldap_filters _ldconfig _ldd _ld_debug \ - _less _lha _libvirt _lighttpd _limit \ - _limits _links _lintian _list _list_files \ - _lldb _ln _loadkeys _locale _localedef \ - _locales _locate _logger _logical_volumes _login_classes \ - _look _losetup _lp _ls _lsattr \ - _lsblk _lscfg _lsdev _lslv _lsns \ - _lsof _lspv _lsusb _lsvg _ltrace \ - _lua _luarocks _lvm2 _lynx _lz4 \ - _lzop _mac_applications _mac_files_for_application _madison _mail \ - _mailboxes _main_complete _make _make-kpkg _man \ - _mat _mat2 _match _math _math_params \ - _matlab _md5sum _mdadm _mdfind _mdls \ - _mdo _mdutil _members _mencal _menu \ - _mere _mergechanges _message _mh _mii-tool \ - _mime_types _mixerctl _mkdir _mkfifo _mknod \ - _mkshortcut _mktemp _mkzsh _module _module-assistant \ - _module_math_func _modutils _mondo _monotone _moosic \ - _mosh _most_recent_file _mount _mozilla _mpc \ - _mplayer _mt _mtools _mtr _multi_parts \ - _mupdf _mutt _mv _my_accounts _myrepos \ - _mysqldiff _mysql_utils _nano _nautilus _nbsd_architectures \ - _ncftp _nedit _netcat _net_interfaces _netscape \ - _netstat _nettop _networkmanager _networksetup _newsgroups \ - _next_label _next_tags _nginx _ngrep _nice \ - _nkf _nl _nm _nmap _normal \ - _nothing _npm _nsenter _nslookup _numbers \ - _numfmt _nvram _objdump _object_classes _object_files \ - _obsd_architectures _od _okular _oldlist _open \ - _openldap _openstack _opkg _options _options_set \ - _options_unset _opustools _osascript _osc _other_accounts \ - _otool _pack _pandoc _papers _parameter \ - _parameters _paste _patch _patchutils _path_commands \ - _path_files _pax _pbcopy _pbm _pbuilder \ - _pdf _pdftk _perf _perforce _perl \ - _perl_basepods _perlbrew _perldoc _perl_modules _pfctl \ - _pfexec _pgids _pgrep _php _physical_volumes \ - _pick_variant _picocom _pidof _pids _pine \ - _ping _pip _piuparts _pkg5 _pkgadd \ - _pkg-config _pkgin _pkginfo _pkg_instance _pkgrm \ - _pkgtool _plutil _pmap _pon _portaudit \ - _portlint _portmaster _ports _portsnap _postfix \ - _postgresql _postscript _powerd _pr _precommand \ - _prefix _print _printenv _printers _process_names \ - _procstat _prompt _prove _prstat _ps \ - _ps1234 _pscp _pspdf _psutils _ptree \ - _ptx _pump _putclip _pv _pwgen \ - _pydoc _python _python_module-http.server _python_module-json.tool _python_modules \ - _python_module-venv _qdbus _qemu _qiv _qtplay \ - _quilt _rake _ranlib _rar _rcctl \ - _rclone _rcs _rdesktop _read _read_comp \ - _readelf _readlink _readshortcut _rebootin _redirect \ - _regex_arguments _regex_words _remote_files _renice _reprepro \ - _requested _retrieve_cache _retrieve_mac_apps _ri _rlogin \ - _rm _rmdir _route _routing_domains _routing_tables \ - _rpm _rrdtool _rsync _rubber _ruby \ - _run-help _runit _samba _savecore _say \ - _sbuild _sccs _sched _schedtool _schroot \ - _scl _scons _screen _script _scselect \ - _sc_usage _scutil _seafile _sed _selinux \ - _selinux_contexts _selinux_roles _selinux_types _selinux_users _sep_parts \ - _seq _sequence _service _services _set \ - _set_command _setfacl _setopt _setpriv _setsid \ - _setup _setxkbmap _sh _shasum _shortcuts \ - _showmount _shred _shuf _shutdown _signals \ - _signify _sioyek _sisu _slabtop _slrn \ - _smartmontools _smit _snoop _socket _sockstat \ - _softwareupdate _sort _source _spamassassin _split \ - _sqlite _sqsh _ss _ssh _sshfs \ - _ssh_hosts _stat _stdbuf _store_cache _stow \ - _strace _strftime _strings _strip _stty \ - _su _sub_commands _sublimetext _subscript _subversion \ - _sudo _suffix_alias_files _surfraw _SUSEconfig _svcadm \ - _svccfg _svcprop _svcs _svcs_fmri _svn-buildpackage \ - _swaks _swanctl _swift _sw_vers _sys_calls \ - _sysclean _sysctl _sysmerge _syspatch _sysrc \ - _sysstat _systat _system_profiler _sysupgrade _tac \ - _tags _tail _tar _tar_archive _tardy \ - _tcpdump _tcpsys _tcptraceroute _tee _telnet \ - _terminals _tex _texi _texinfo _tidy \ - _tiff _tilde _tilde_files _timeout _time_zone \ - _time_zone.orig _tin _tla _tload _tmux \ - _todo.sh _toilet _toolchain-source _top _topgit \ - _totd _touch _tpb _tput _tr \ - _tracepath _transmission _trap _trash _tree \ - _truncate _truss _tty _ttyctl _ttys \ - _tune2fs _twidge _twisted _typeset _ulimit \ - _uml _umountable _unace _uname _unexpand \ - _unhash _uniq _unison _units _unshare \ - _update-alternatives _update-rc.d _uptime _urls _urpmi \ - _urxvt _usbconfig _uscan _user_admin _user_at_host \ - _user_expand _user_math_func _users _users_on _valgrind \ - _value _values _vared _vars _vcs_info \ - _vcs_info_hooks _vi _vim _vim-addons _visudo \ - _vmctl _vmstat _vnc _volume_groups _vorbis \ - _vpnc _vserver _w _w3m _wait \ - _wajig _wakeup_capable_devices _wanted _watch _watch-snoop \ - _wc _webbrowser _wget _whereis _which \ - _which-pkg-broke _who _whois _widgets _wiggle \ - _wipefs _wpa_cli _xargs _x_arguments _xauth \ - _xautolock _x_borderwidth _xclip _xcode-select _x_color \ - _x_colormapid _x_cursor _x_display _xdvi _x_extension \ - _xfconf-query _xfig _x_font _xft_fonts _x_geometry \ - _xinput _x_keysym _xloadimage _x_locale _xmlsoft \ - _xmlstarlet _xmms2 _x_modifier _xmodmap _x_name \ - _xournal _xpdf _xrandr _x_resource _xscreensaver \ - _x_selection_timeout _xset _xt_arguments _xterm _x_title \ - _xt_session_id _x_utils _xv _x_visual _x_window \ - _xwit _xxd _xz _yafc _yast \ - _yodl _yp _yum _zargs _zattr \ - _zcalc _zcalc_line _zcat _zcompile _zdump \ - _zeal _zed _zfs _zfs_dataset _zfs_pool \ - _zftp _zip _zle _zlogin _zmodload \ - _zmv _zoneadm _zones _zparseopts _zpty \ - _zsh _zsh-mime-handler _zsocket _zstd _zstyle \ - _ztodo _zypper _7zip _a2ps _a2utils \ - _aap _abcde _absolute_command_paths _ack _acpi \ - _acpiconf _acpitool _acroread _adb _add-zle-hook-widget \ - _add-zsh-hook _alias _aliases _all_labels _all_matches \ - _alsa-utils _alternative _analyseplugin _ansible _ant \ - _antiword _apachectl _apm _approximate _apt \ - _apt-file _aptitude _apt-move _apt-show-versions _arch_archives \ - _arch_namespace _arg_compile __arguments _arguments _arp \ - _arping _arrays _asciidoctor _asciinema _as_if \ - _assign _at _attr _augeas _auto-apt \ - _autocd _avahi _awk _axi-cache _base64 \ - _basename _basenc _bash _bash_completions _baudrates \ - _baz _beadm _bectl _beep _be_name \ - _bibtex _bind_addresses _bindkey _bison _bittorrent \ - _blkid _bogofilter _bpf_filters _bpython _brace_parameter \ - _brctl _bsdconfig _bsd_disks _bsdinstall _bsd_pkg \ - _btrfs _bts _bug _builtin _bzip2 \ - _bzr _cabal _cacaclock _cache_invalid _caffeinate \ - _cal _calendar _call_function _canonical_paths _capabilities \ - _cat _ccal _cd _cdbs-edit-patch _cdcd \ - _cdr _cdrdao _cdrecord _chattr _chdman \ - _chflags _chkconfig _chmod _choom _chown \ - _chroot _chrt _chsh _cksum _clay \ - _cmdambivalent _cmdstring _cmp _code _col \ - _column _combination _comm _command _command_names \ - _compadd _compdef _compinit _complete _complete_debug \ - _complete_help _complete_help_generic _completers _complete_tag _comp_locale \ - _composer _compress _condition _configure _coreadm \ - _correct _correct_filename _correct_word _cowsay _cp \ - _cpio _cplay _cpupower _crontab _cryptsetup \ - _cscope _csplit _cssh _csup _ctags \ - _ctags_tags _cu _curl _cut _cvs \ - _cvsup _cygcheck _cygpath _cygrunsrv _cygserver \ - _cygstart _dak _darcs _date _date_formats \ - _dates _dbus _dchroot _dchroot-dsa _dconf \ - _dcop _dcut _dd _deb_architectures _debbugs_bugnumber \ - _debchange _debcheckout _deb_codenames _debdiff _deb_files \ - _debfoster _debmany _deborphan _deb_packages _debsign \ - _debsnap _debuild _default _defaults _delimiters \ - _describe _description _devtodo _df _dhclient \ - _dhcpinfo _dhomepage _dict _dict_words _diff \ - _diff3 _diff_options _diffstat _dig _directories \ - _directory_stack _dir_list _dirs _disable _dispatch \ - _django _dladm _dlocate _dmesg _dmidecode \ - _dnf _dnf5 _dns_types _doas _domains \ - _dos2unix _dpatch-edit-patch _dpkg _dpkg-buildpackage _dpkg-cross \ - _dpkg-info _dpkg-repack _dpkg_source _dput _drill \ - _dropbox _dscverify _dsh _dtrace _dtruss \ - _du _dumpadm _dumper _dupload _dvi \ - _dynamic_directory_name _e2label _ecasound _echo _echotc \ - _echoti _ed _elfdump _elinks _email_addresses \ - _emulate _enable _enscript _entr _env \ - _eog _equal _espeak _etags _ethtool \ - _evince _exec _expand _expand_alias _expand_word \ - _extensions _external_pwds _fakeroot _fbsd_architectures _fbsd_device_types \ - _fc _feh _fetch _fetchmail _ffmpeg \ - _figlet _file_descriptors _file_flags _file_modes _files \ - _file_systems _find _findmnt _find_net_interfaces _finger \ - _fink _first _fish _flac _flex \ - _floppy _flowadm _fmadm _fmt _fold \ - _fortune _free _freebsd-update _fsh _fstat \ - _fs_usage _functions _fuse_arguments _fuser _fusermount \ - _fuse_values _fw_update _gcc _gcore _gdb \ - _geany _gem _generic _genisoimage _getclip \ - _getconf _getent _getfacl _getmail _getopt \ - _ghostscript _git _git-buildpackage _global _global_tags \ - _globflags _globqual_delims _globquals _gnome-gv _gnu_generic \ - _gnupod _gnutls _go _gpasswd _gpg \ - _gphoto2 _gprof _gqview _gradle _graphicsmagick \ - _grep _grep-excuses _groff _groups _growisofs \ - _gsettings _gstat _guard _guilt _gv \ - _gzip _hash _have_glob_qual _hdiutil _head \ - _hexdump _history _history_complete_word _history_modifiers _host \ - _hostname _hosts _htop _hwinfo _iconv \ - _iconvconfig _id _ifconfig _iftop _ignored \ - _imagemagick _inetadm _initctl _init_d _install \ - _in_vared _invoke-rc.d _ionice _iostat _ip \ - _ipadm _ipfw _ipsec _ipset _iptables \ - _irssi _ispell _iwconfig _jail _jails \ - _java _java_class _jexec _jls _jobs \ - _jobs_bg _jobs_builtin _jobs_fg _joe _join \ - _jot _jq _kdeconnect _kdump _kfmclient \ - _kill _killall _kld _knock _kpartx \ - _ktrace _ktrace_points _kvno _last _ldap \ - _ldap_attributes _ldap_filters _ldconfig _ldd _ld_debug \ - _less _lha _libvirt _lighttpd _limit \ - _limits _links _lintian _list _list_files \ - _lldb _ln _loadkeys _locale _localedef \ - _locales _locate _logger _logical_volumes _login_classes \ - _look _losetup _lp _ls _lsattr \ - _lsblk _lscfg _lsdev _lslv _lsns \ - _lsof _lspv _lsusb _lsvg _ltrace \ - _lua _luarocks _lvm2 _lynx _lz4 \ - _lzop _mac_applications _mac_files_for_application _madison _mail \ - _mailboxes _main_complete _make _make-kpkg _man \ - _mat _mat2 _match _math _math_params \ - _matlab _md5sum _mdadm _mdfind _mdls \ - _mdo _mdutil _members _mencal _menu \ - _mere _mergechanges _message _mh _mii-tool \ - _mime_types _mixerctl _mkdir _mkfifo _mknod \ - _mkshortcut _mktemp _mkzsh _module _module-assistant \ - _module_math_func _modutils _mondo _monotone _moosic \ - _mosh _most_recent_file _mount _mozilla _mpc \ - _mplayer _mt _mtools _mtr _multi_parts \ - _mupdf _mutt _mv _my_accounts _myrepos \ - _mysqldiff _mysql_utils _nano _nautilus _nbsd_architectures \ - _ncftp _nedit _netcat _net_interfaces _netscape \ - _netstat _nettop _networkmanager _networksetup _newsgroups \ - _next_label _next_tags _nginx _ngrep _nice \ - _nkf _nl _nm _nmap _normal \ - _nothing _npm _nsenter _nslookup _numbers \ - _numfmt _nvram _objdump _object_classes _object_files \ - _obsd_architectures _od _okular _oldlist _open \ - _openldap _openstack _opkg _options _options_set \ - _options_unset _opustools _osascript _osc _other_accounts \ - _otool _pack _pandoc _papers _parameter \ - _parameters _paste _patch _patchutils _path_commands \ - _path_files _pax _pbcopy _pbm _pbuilder \ - _pdf _pdftk _perf _perforce _perl \ - _perl_basepods _perlbrew _perldoc _perl_modules _pfctl \ - _pfexec _pgids _pgrep _php _physical_volumes \ - _pick_variant _picocom _pidof _pids _pine \ - _ping _pip _piuparts _pkg5 _pkgadd \ - _pkg-config _pkgin _pkginfo _pkg_instance _pkgrm \ - _pkgtool _plutil _pmap _pon _portaudit \ - _portlint _portmaster _ports _portsnap _postfix \ - _postgresql _postscript _powerd _pr _precommand \ - _prefix _print _printenv _printers _process_names \ - _procstat _prompt _prove _prstat _ps \ - _ps1234 _pscp _pspdf _psutils _ptree \ - _ptx _pump _putclip _pv _pwgen \ - _pydoc _python _python_module-http.server _python_module-json.tool _python_modules \ - _python_module-venv _qdbus _qemu _qiv _qtplay \ - _quilt _rake _ranlib _rar _rcctl \ - _rclone _rcs _rdesktop _read _read_comp \ - _readelf _readlink _readshortcut _rebootin _redirect \ - _regex_arguments _regex_words _remote_files _renice _reprepro \ - _requested _retrieve_cache _retrieve_mac_apps _ri _rlogin \ - _rm _rmdir _route _routing_domains _routing_tables \ - _rpm _rrdtool _rsync _rubber _ruby \ - _run-help _runit _samba _savecore _say \ - _sbuild _sccs _sched _schedtool _schroot \ - _scl _scons _screen _script _scselect \ - _sc_usage _scutil _seafile _sed _selinux \ - _selinux_contexts _selinux_roles _selinux_types _selinux_users _sep_parts \ - _seq _sequence _service _services _set \ - _set_command _setfacl _setopt _setpriv _setsid \ - _setup _setxkbmap _sh _shasum _shortcuts \ - _showmount _shred _shuf _shutdown _signals \ - _signify _sioyek _sisu _slabtop _slrn \ - _smartmontools _smit _snoop _socket _sockstat \ - _softwareupdate _sort _source _spamassassin _split \ - _sqlite _sqsh _ss _ssh _sshfs \ - _ssh_hosts _stat _stdbuf _store_cache _stow \ - _strace _strftime _strings _strip _stty \ - _su _sub_commands _sublimetext _subscript _subversion \ - _sudo _suffix_alias_files _surfraw _SUSEconfig _svcadm \ - _svccfg _svcprop _svcs _svcs_fmri _svn-buildpackage \ - _swaks _swanctl _swift _sw_vers _sys_calls \ - _sysclean _sysctl _sysmerge _syspatch _sysrc \ - _sysstat _systat _system_profiler _sysupgrade _tac \ - _tags _tail _tar _tar_archive _tardy \ - _tcpdump _tcpsys _tcptraceroute _tee _telnet \ - _terminals _tex _texi _texinfo _tidy \ - _tiff _tilde _tilde_files _timeout _time_zone \ - _time_zone.orig _tin _tla _tload _tmux \ - _todo.sh _toilet _toolchain-source _top _topgit \ - _totd _touch _tpb _tput _tr \ - _tracepath _transmission _trap _trash _tree \ - _truncate _truss _tty _ttyctl _ttys \ - _tune2fs _twidge _twisted _typeset _ulimit \ - _uml _umountable _unace _uname _unexpand \ - _unhash _uniq _unison _units _unshare \ - _update-alternatives _update-rc.d _uptime _urls _urpmi \ - _urxvt _usbconfig _uscan _user_admin _user_at_host \ - _user_expand _user_math_func _users _users_on _valgrind \ - _value _values _vared _vars _vcs_info \ - _vcs_info_hooks _vi _vim _vim-addons _visudo \ - _vmctl _vmstat _vnc _volume_groups _vorbis \ - _vpnc _vserver _w _w3m _wait \ - _wajig _wakeup_capable_devices _wanted _watch _watch-snoop \ - _wc _webbrowser _wget _whereis _which \ - _which-pkg-broke _who _whois _widgets _wiggle \ - _wipefs _wpa_cli _xargs _x_arguments _xauth \ - _xautolock _x_borderwidth _xclip _xcode-select _x_color \ - _x_colormapid _x_cursor _x_display _xdvi _x_extension \ - _xfconf-query _xfig _x_font _xft_fonts _x_geometry \ - _xinput _x_keysym _xloadimage _x_locale _xmlsoft \ - _xmlstarlet _xmms2 _x_modifier _xmodmap _x_name \ - _xournal _xpdf _xrandr _x_resource _xscreensaver \ - _x_selection_timeout _xset _xt_arguments _xterm _x_title \ - _xt_session_id _x_utils _xv _x_visual _x_window \ - _xwit _xxd _xz _yafc _yast \ - _yodl _yp _yum _zargs _zattr \ - _zcalc _zcalc_line _zcat _zcompile _zdump \ - _zeal _zed _zfs _zfs_dataset _zfs_pool \ - _zftp _zip _zle _zlogin _zmodload \ - _zmv _zoneadm _zones _zparseopts _zpty \ - _zsh _zsh-mime-handler _zsocket _zstd _zstyle \ - _ztodo _zypper -autoload -Uz +X _call_program - -typeset -gUa _comp_assocs -_comp_assocs=( '' ) - -#omz revision: -#omz fpath: /nix/store/zjxd2rbflv02rsfdrsay5wmv05vf8691-oh-my-zsh-2026-02-19/share/oh-my-zsh/plugins/history /nix/store/zjxd2rbflv02rsfdrsay5wmv05vf8691-oh-my-zsh-2026-02-19/share/oh-my-zsh/plugins/dirhistory /nix/store/zjxd2rbflv02rsfdrsay5wmv05vf8691-oh-my-zsh-2026-02-19/share/oh-my-zsh/plugins/git /nix/store/zjxd2rbflv02rsfdrsay5wmv05vf8691-oh-my-zsh-2026-02-19/share/oh-my-zsh/functions /nix/store/zjxd2rbflv02rsfdrsay5wmv05vf8691-oh-my-zsh-2026-02-19/share/oh-my-zsh/completions /nix/store/zjxd2rbflv02rsfdrsay5wmv05vf8691-oh-my-zsh-2026-02-19/share/oh-my-zsh/custom/functions /nix/store/zjxd2rbflv02rsfdrsay5wmv05vf8691-oh-my-zsh-2026-02-19/share/oh-my-zsh/custom/completions /home/user01/.cache/oh-my-zsh/completions /nix/store/z7jz33yvsqvfv3qxpy2r9mp3mh0ngcvg-devenv-profile/share/zsh/site-functions /home/user01/.nix-profile/share/zsh/site-functions /home/user01/.nix-profile/share/zsh/5.9.1/functions /home/user01/.nix-profile/share/zsh/vendor-completions /nix/profile/share/zsh/site-functions /nix/profile/share/zsh/5.9.1/functions /nix/profile/share/zsh/vendor-completions /home/user01/.local/state/nix/profile/share/zsh/site-functions /home/user01/.local/state/nix/profile/share/zsh/5.9.1/functions /home/user01/.local/state/nix/profile/share/zsh/vendor-completions /etc/profiles/per-user/user01/share/zsh/site-functions /etc/profiles/per-user/user01/share/zsh/5.9.1/functions /etc/profiles/per-user/user01/share/zsh/vendor-completions /nix/var/nix/profiles/default/share/zsh/site-functions /nix/var/nix/profiles/default/share/zsh/5.9.1/functions /nix/var/nix/profiles/default/share/zsh/vendor-completions /run/current-system/sw/share/zsh/site-functions /run/current-system/sw/share/zsh/5.9.1/functions /run/current-system/sw/share/zsh/vendor-completions /nix/store/4wvhzvwmv2rnwgcg0sadhs769hky28xk-zsh-5.9.1/share/zsh/5.9.1/functions diff --git a/.devenv/zsh/.zcompdump-HACKSTATION-5.9.1.zwc b/.devenv/zsh/.zcompdump-HACKSTATION-5.9.1.zwc deleted file mode 100644 index 8884f0f480a27dae00a1c7165a35fe6d1537efdf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 131144 zcmeFaeSBP1e%~)yc7n3Fv6IyXZ*YQlaRR#tu)!=&@Mg7GyC`dejjdh0!5Ky~qtV#& zqbI*M`_uTXFJ?D5f&3hAtTrpYA6+ zU>;hU8XDHY4(NqJ*W<2}t}7Ok4mx2!oP;S@x}>3DJ!D`%48t63{XUKbXJ8sG!%DKE z4dO5a=V0Yk4GrzEA0*u{dKzY3*EL&spX;dWylck~*!Cl?XI+g#{$N8x2MmDhcMLrX zjmyXzI0mQT0<2ojb%LBfhf4koqT?_R%YUe$p%u2m033ΝPas8a6-`PQnFf`6Owf z9fn{WCgGy%k`@cELN~xpI0ECYv*?OXkvEWoVVHn9So0%1e-J(CI_tXi8jC-L%JD9s z^U%Tz)(!(O1mhsj;Uc>H)07<$-3bTb6imUAA0=O)4R$~k{JOuR-PbThS^Ed;Fy9(lz8I z#6kAohYrKI#C<=FbJa{_4E|l zawpp$0|((0T!7~F><0sI6r{Y2iNf-q;`oq)!!QmPVdYPo?nLGIgXk%k0lBZ{yLf-0 z3ZpRNx?+Q+Z$mS11kOP77kS>$>AD|10wXX1Gtm4qq=6l95F{T)U1!kcU!u&x4j6zD zn1<#y$}mX%+JWZa2uQk<=oz>OQlBsVvT3L5FnSUuU>cU(&Ar2V*a|rqgp)7@OE;Q! zpuI5cI*Bf6XFm`ffa5Uby7DVr8w|LPqGwKY`8kVUgT~>AhbLTH9;9x7gD?)4VZ~0$E9`)Ma173Zymxc1 ztA3vAg#$1Qr(g<}#3&Q66;iMdj=@=&gOv}NZbgNv>k(8q?K+DJtKz1c(JCB;37B?m z>9X(!*SPBe*JG}eu8j#xeDomEb3KjzxF$MSU*+5uHK3?py`W}&%{vI4T-W;6o_ zJbVlthYKEF(r@Wn(N5U!;bGS?^c>8C)KlvQ$Tt`Vsds14#=Vpk*Z^@DgfU?eWe=5d zu;drGCg^~DFzR{{UH&k~g%k{levapcYJH2!_+nPJtsqbKk^a-1%Qc0{c;W~u{l}B2 z>_34Xru@#J(ob9ZcRA-;@)?zICo27~eW>)Oj-t{(8bhVOGlgE3ZGVqrf043{N;}?( zN_$#G2jMtKJ2#F>dvgwzc4QuvdTjY4oD(`h>VqmO<#Px<31?u*e%=d^_j)HP@5g@h zI83@O{YCN!;&1>)U=kW1HC>O&I4^|`!YP=7C67_2VKYd%9dsQ-<-MLn<-NU(%5|+e zz%hHd9#qQFPE^XvK2(l(43%`JB@9b{iQ~g&H~`}?3oXA)JhVeE48tg#g_Vy}&OyQ> zt`n{;2Q9wcb;$Js+W7amK9F+Pj_!mi48b_e!17<=zMu^{VHmW1MWy^qqs>onZO{q( z;3%Aii_kL2zL0|hFbtz`2IRbRsNDCeU$x_QpuI2zQ?TS8n0C4zc0K31{E%;VJ>q%+ zm2pbTVbi$l5PA|Ofd3n2__O@ic-9by18^M9z%(@ey6H;S^{#RBAdE^FTArjl!4B95 z$6x|xT~{2j_isI#fgzCRK8i}cbOBxY8$1K3!XTW4NtlBb|Bz<{``|d7_3&j>#!suh zMI8(W1j@@0D&=O>^{neW+A_pD1e+lPLvTiP1@D<_>u*{(?s~*^0=)>!e~V+lR*>`L zTo0mh{$uEAn1<%3C?BvHdSM90g@L-R4KPu8P5U;u_;45ne}?~-q@9;E)+;aYV)ik^bA za1omS33&}$L5|alYW?Xt?mCT1d(r%?rCW`*K^&@Z6eeH}q`q2y+}`I_RJM1bD;v08 zRNBj7(L7}Wy#S5>l>J~Q9D%bS=bJ}cevfwvcEEl(4wEnst4?t264#GPzhfUdEH=!; zx)F~1%akKj#>G|iD4c~k*znIdC+r6a52JFNF;voDK&73ZN45X=`yYad zdKp$d&wKWD?g!lg126<*Fa?dHwtuVZfa@t#`mtwGt$)#$KcxJC_(wWX$&Uf_7)-)t zSn)MG9!Z=L9Wmx?p29e15^UHQl45e&GVLeIiQX#NhzfHsK3J~#@eU=rkh=g^Lq*&jqFUXUKr`H};{&;T*{OF^{f%g)~rw z<8Tg^PFR0rjp#bA4b8z37>8Mq_!WP`vxH9A2ghLyCS5PPuKKqYztuJ4y5Du!bsUxc z&m=kzt6t?EAq5BEIE=#-T!vL=?EP*>hGmCFUH$%#GKROI!FbS()r+$2Za)cg$F_?zslh~giPtdK<>pJKHw~fUADTerco$Kr&zt`vc?ug~2MmDp-$zk-AI_ndVf7na zKU7@@T}M#qpPY7`a-Bn^-?ZW!&kA;e>_6ao44r^k4=?>slqcwbIP3#Se*`@R7ohpi z$p_d0`(YTyK>W;8=!)}f0~zNYKxO|CRQh43QMun)*On;@uXo+*I^a6&I_^4yw)|(_ zKal*(p+hhM($AkkrJuj_zwn&C#dV_6-|s}FUhGAW!IbN&H+cqZZ%3s+pL0Emj>EKT z%LTiS^{9+H;vODArCvJh;ZfH~RNkx0t~dS#`$H9^oQp3k6iAItwM+o2aEeh3|d zX^`VLzs0kMc1XcNkbcHV*Ll~S)0_higN$oVq0(+np>weOzi}Mc3i4bst_NL@q4Int z&?%UMrT?9B36j1SJqX7WPZcn)oOn=$}$KRZ!*PX^E;pD z!@Yp$K{y2$J-qUN_;%L=s2ukwItEi9?dpo}k~dHV@gE#UkHHy`d8Zjv+LPvYcu%0+ zHRXEL^$aT4JBP~tD=u38Z$L9J1mkcKmj6%g7jke6F2Jh)W%u8KN84n#m<$WIU z_z83dmcC25gsqT+K{y8EFbk_^$x9f5S=ju)v0(<5{~w+UWMBwpVe|Jm4_tsHa~vD0 zFb>WCmwbj%Sn-#S1IJ{W-uFb^$%#qkDtrlJ|H z2i*Y!a2(FSMOgQ~^|w>52VIY&QeIA@Q!p=K%Ei*l>;rKagfWQsMHfV^svOi6f9|MY*+pp|Z`+3oI)uKl2?`}X-FyuP!dJ$d80+Owefde4@jbrF3m~m}fOgh*AQjT__`{6j8 zfjMYh!nt7x#z4l|7bNc2xaaR9ExHO_51lXoM_nh-IavMucAhp=#x*%~5Jo`ylasFV zuB)%I_)gb-sI>nlU8g+0vDxBRqtYJkMEAi_kmH_lopW9N1D5aYXdL##FpR+rtoQ_Z z4>=fwlQ0RFCCs(0y4tiI9k_!s?>gisI-fE6oEH@Ie8kGPJzUUXghV?4(m#)#-<$hi)o;_n(o<$PyRNjHzm zc~<6Z?YHBO|VtT{pK{x=~cdD@$&sOv65q@M+hjw^;m6*AZ08{aIA}VRNXIo7K0n z-*c1)RO*WXRPtd69fN6s{TkO;KCeM{!XS*pJjnj5)>1xN=trQ^?hT-Wa13;w0F`!m z#Xg_jH`xF8Mlm~;!mEEc&=j(mHJ}&?WV1+DO9%aL#2N`j7mRn z44s0;b-bIf&Nc3O&~?;x%5}*do*vx^2SKj$C^`izzd+p%ao7h#Fb31EEAO;$CwiFo zt=DxJJq71L^6N5s<9hBNq<_VH2w@_89HGf9EVBJ`*vOVCA*JxsKm!z_q!f*opHUf&C=yuhg?s)uK2R$!v<82 zmvKFU%Dlk{D&=PiU2-?q2a;~5>p}D=jCpt#U9pk61w{9O%s&%hk4Y^RL{InDq& z45wiZZv2YnS39cyH&n`X6_xS#uuWFBN3m3fdUwE1VL^B@j`a1zeJ9JGARufw(1br_ZR{0urLaht4P z*N)0KIEP9(IgF0L8JLF+n<)qM`*W^GUC*KyVd=f5YtXGw1$i$9(UWivmfXjC3lQ0D`|F-0Qo;R!kxsMLl zUe}|p=g@grxy{mTbv=m6{Le8|>c`XQ1!&xE;nk?jCv|u@h01!t{pc|`<2sM7?&O|e zoOWj)IxIGb-+T_0d8p-ICmn2n9dHEBK;t*KHrU{rL8bidN9BHxqf^lG0A&?6LoW=$ z7)-;`9po2uLKOz#wCk+v`ft+K!6eA`%dYExj_ZMaa174EEVMjmx*mRYL6^okE=aoL=nS-Wac?jV z65pCI?L|l7GOSNh=0MuLadaNmr5KaIS&;oYyLmn^11r;nLFNT>sMODgQJEhcL8oAO z4|DVY{pv&qVFF}ca~757w>-!5`U1}gm44e+ zRL)mL2jMtOz(r`zlMduQ+R+>g!5B=#Wmr+*SwjwF-gFQ>2IFuUHWy6~x}I}w?zQ+f zbSLZsnQuLej>DYmjU}sJcA}#&2g}RkH*AF}9EOu1_j4AN=QxYX{VuJLCy;@IFaqND zI)}=59JqfAmO|Q#L@(lW{%ldKwk~;0)S4KsxAz{UGzTM^WjAPNK37q;W508!|8mqagFRXVE!W z`3u|=#6kSxgRZC03()*9dGV+CVo>RqZbrp#(ThsI_6REd@ljOPrA(sIo;L2IOh6|{ zeSHv>{g0ui;Q~m1cgf#H;S|h5>)+$JTz4Ej03#st%x6*YgUq@vf5gITT&u39T^sk? z_Eo6#v)WvHU5~k5a9#C_maZMG!f}{@iy-SBS{_AV0K^Y-RKmnhNZcLN-{`8xC~F}7 zhr_6R=Wz;^?`zf^Fg@+M^_R$ps~CU$vgs*QzI$nXoag&F`pvFO4_bIXy6*2&{z0_$ zS9pJ50^~exPf)gD8l<0|8MNnf23_;3x+KGzY~bFR(5ZRysz#$5+p&$!OHuKpcMztwf0 z>v7j{*J;nsFU-UHZEgzZ2aL$3g1Hv*;|e z{1fUEh{ItRah*cN-@5Wyw!;qBBj^}>_r>onouXY%fdUMou61@yJ{+`8mpod`!WSz+zs`IfYXa^p~Pk>6lvJ)MEqi`B7 zLdyu{12S*~#$guZyOZVrjQfHV9Dxa#g_XZgy$NyH4=2T@A3cG}`j#0~#uv@cagDGU z_Q6Rw3v;mMB=sl^!vsvjl0V?SXy031H>0vWg&u_q9-c>AzRmLl*&av5zcJ|H5%es~ zdw9k3oDVXt!>FFu^)lKr%5{RgCskC!$6*34O85`SCy@KhptApd^f*kyEG+-$JV)BO zHK=UgidMz;@F}$A1=h)D<8>HYUoP#-N`B%h4FC2tpFb3yf$xDMDe-{AS8 z;?LQM%K59Poc|~)`;Vj2&YyE_{0{XjtOH4xLgo7Rp+{i?WZrKEZF!kz4YGYFD&=Va zJql-_@ifm5jPr(If ze1&!dq+Z&9O8MT2?gy%phBjDqsIlSEzaZVM4Gqr{FW=Y6w|DX#j(jU4>y`JBud+^A zz8RDCq_VbD){)AZQdvJLYe{9@XeY>ePg(mZ>*Hjtovb&LHSDc_W_>7G*C1tA)+fkX z1zDdUntPMJH^}^{gk>I7=167!Q&i?ZMP)un`f%dMlN?81u@-3J6F{Ljl z{!6(I@n6bXJn>&jSp1i=UHq5Qw-f)R^y$QZDc2|dONkf%rRF&*+r=*_J~;6!$e3Kl zoiYZM@urMPWxOe2=}$}FTKb)OeCj({!zA^hjDa?D4vCj?Ecq+tSMoP{F4r_P-2K0J zE{zQhukl>wVdq5Mb9;^L@3NhAj}box^1a(xRQg4;uFL<#!fVizkC30Jtcy8{Hve1p z2boXWfeylPn1<$8c@Lo%#$XD>f4Ke(W$zyD6&-^qX#01(lOX++CI6m$`BmOoRK80( zi%P#{{cE=WB)ak}=YxZA9LAykzMKBi?)y#Rm;Nbv1=03v8ycG4Yi#&k%I=>gKHv1` z*Dh*^v;8Ez16rm@bN3Z#*8Lgf9_rIPdPSNS*e=Hr4afP;6=~k{G@>C*)BM8gx&3uJ zj%Y}8_Z4Zfo<=mJdGv}j&wCotkmfsAq&*#p@cr z!?v$9H8#9O{GXrr)26G=H8xxex55@E!V~a3oQJFa6Zr#o!X~J|rC5D77g~fT;dyuqmQ8U?=z(v+2%LkZ|C#HBlQ0h}{|oIo48eK0 z3~g`HpMVRn@&fG)9ELN{@)z`-Ap=js^Dqt9{#WuHDsUc_y~VY`6Yv5|!K!KMc^HBz zSoz;LHXH=G-`CK^|Glx{2G|5y_!hhZZ^8TU$+x*L*aSWB3Y>@U!L>7u4I3c~`(YBU z{vR9I9A1a-!L_t=cY)O1+tEkhNq7!kg}30US?&RP z;0bsZ-hl7H_5Yh=!^7|roQJFa56=RU@HjjJFTkttE?oV+#)j+QF6e=0;B|N#md%k@ za0p(3^Kj|YpKY2$@BF{y86@E`I03K1JFx68IUYO!6*vUX!7K14ybqszkNx3cI0Vna zi*O#6&2x{i2_A0R`y_sJ{R1VwlnUV=B_Jy>>``V=mG`uCb1L@V$(JOwYno3Qw=ITt(#kHNR#d3Y5T z{|(m%cfw9M1SjBSxb&INHl0UrXjs%xfv4ehSk}0x;dXcko`C1zJbZG|qJ}%+L3jk7 zfmh*uxV~vo!vk>XGq*K8j6MUe!h5i6@uG$=!2?i%6Yx5`4c9K=Jn%R?4KKqxaP{{s zYPbP5K@U6$&%#Ua4lMqDw!>C<3Pz#vsznWJU?&`cm*G6T2iG<)YPbg;gookMXMV5g zDfA_H6Bhr#qK0drAD)7j;XJ$#mp=E|rfWaJJ-|co47>tw!?LTn4!8@pKo*{WXW>V4#5j>)!*UxYk#z9JK6(}!E^8$ybE{!Ao1`mcplz?#mhJ+JPc34 z^Y9wH4GsJl&^2%;JP7^p1Uv(;zy-MOhj_lQ1^VF`cncbScu~Wxkc30<47>!d!@IEf zlbjbGgh${Rcp2V?t6LT|+yoCn6<&n%uQ!=;~nwCN%AVR#argID2uuMA$AfW8S0*ONc61&VM8UWa9? zIW}DCdbH_M*Kaj#!p_3u@C>{JZ@{~7)lZODa2ITc3Oo+a!7K14d=IYvNw&jF@D{ue zH{8Ir!#;QxUWC`+ZCHFGc?Vmd2#4SVyb5o@dvML?I4?X16?g((hD*EdZkj=teST5H zm!Jn8gJ<9+co&x4#J$62coNRT;#Tej?tvbV{@)|$Q}7bJ4wrV(uAM8YJPen1 zeY@#N^c8pquDOMB2T6DW&cl1~$y<3QP=Tl5C3q9ATf=jL$3gm*FQBi(yKvQ7j$cYN zT`KKvx)%F(*be>h1Uv_C!259RZIo$v5T1h9;nLpEHeG-FqK1vo1CPM7@H)H$%hs_C z9)T0^2D}3|-9cW!L+}VZ4X?ucaLpIE4oJe&@EW`Yi|=F`d!K3ySa*oQF%l_O+%Pz9PE2=^iu*kHE{Y_^ae8+yxInKOBY^ z;B|NxuDOSE!zM_=BX9y*0=L3F z@E{z56Yv_m3pag(>wt&g33wV_fb;M@xcUL^5gvp`-~_w_4Lc}%a4XycSr~-Z;cd9; zo7_L#1zX_KZ~uBz5Bem$3U5Kf&vAY5C3p~ua0s4-SK%F4_8`vzwnGnm3!aD9;61oz zC)WU5APa|K8m{?y>NeN{S$G_thu5GX#x}^p33vtGg=-$-T(BLA@HjjNm;T^uP4A*h z;%tZQP=rJ947>>qUF;8+{-~+pE_4g@z+>}z>6C9XHBo6Z$m?t zG=K7F(>3T#a1SKm5qJ(>fp_8R9QOiu!X|hGo`sj-b$A=D%5zTG2tDu^JP)tJ1-PNW zzL12+;A!}HEdKFW{Nu4W?^Y9S4SYNnr{24ox&=NSi&M9MiZ&WP9*fh?{1|N!d^{GX zPxBMB@$m6j{Nu6s$7Au2$KoH4#Xla4e>@idcr5<^XDqJk4p=AkD1L}vVr@uRcks<| z#`%oZ!}ccp5oxx+N8E}ceglyI+K@%EhJx)Z9n<*lzOz`@B+2%e{F@x*hT&MTl)}u# z^T}aC!7$z;nRww$TRN#bi$c}pNx6j_vXvG`imIR8nor%g;%; z#6Niww;Qb4@nn}KREZ~(t$VYn)}BIPcWYlJnNC$~d zamyw*;<@;MW>jCQtE*J#<6mcyWche@pqwgZtLaQ$4|zpIJfF$M^J9 z@Z&s|uB_#8WO`()WKTw(cU?reps7PlvXH3To{neZ{R4FonLPhYOr=n&k1J;516^cS zU9w^|t0l^=pmk5Ynw4yf=Pff;2xR&SC3_k*J6=die#Ht!N?66pN4!whqEw70dQxi> z6??E6vOs)+&GpC;;@NV%H7dr%oW`ldi^XiJvL}=3(@c-;itmv}5igbs#ezO1-Y<=? z>n-ZV7b~p^xd7YHnn;!ka?H5IM;S|?JLCCZvn7p{B&MudfmIS$YN%K(5!XA5s zHCs}YdkTH6ds3xxrjWP7^dXV);-2gtt}9kd%6kznC99cyp*2y7r*)rT#HAw9?8nM$ zQH+<;)f~@P)5YpT@shp8Dg-ilt#2X=qY|gw>7JRI-5M{I;sX?bY&FHthYrWolFKS5 zG8qaRWl5qJ1~rtYY)6|s5HD-l(7&zmaygUEw-)22crH~*mGt-)DJQT;r%$fZs}UuA zT$PHQ(KKF7W-4pr*=(UtPF7B3Gx=)2B-agnJzCPM>8LuXrc?SN$E%e>D-T8XsO)Uot!mZRgY?7Q_7%w$$ zYo5H&EeT#8z4<H}SC%T>vpST4EFtgd*eE0fUIpetTZ-6l12OsqR@ z$68?cId!YsvOO;~iA9P(S3ekCDQzWU zu3cItcNMzIF*Um~U6qtP%UEP}W%9}0DXkuAW>=Y% zEDU$$;=A>Ib?qvo3)BLXNj-UeNH$ff+Lnna)sx&e#}0>%%&y`7Tk91`7jBNWQgGvm)DJwSPfk(_x8O!sIT=-qvHAeE zH}El6Vkr6*-a`%~X=@<@mAGc4NmnIV=*!DHmZ+A>R^xPKDpVv?V^ZR43DQ-0$!g&q zN)&aJygFT#Y`mIJ^ia`DX{ZlIhwZA!^Q3NxdzIc*q5D8P%Z~E6B^b(krPQr;A8~4Q zStV-1UuteSP$u6kt#lWak2P&wRV}n8UDZrB+2ij?rd&*Ec1Uc+dIL4Ht7;`yg#g_< zdqdsmB5yP^s^#!hg4MM*q3>ST-c-o_z1@)&8Fs)fIi9o>G&^$Pd-X|}BtHLnqGIWU zyxxg;S6m-nFlZ~|iEP0-c=drqyt_M<$$KwmK`0RpAx9#RqUWb4th4RnVgnxeL+AX{w{`(RWe8TRmf?CePq8vJBjo*w(Tg%KK2i41lk zmC5o??%DgFNR=p@))`Ibs}=24C%P-zpjP@a{QG-yk%=C9b8>L`clx9#5#dc$WF>ld zpLA0)qgT|Ew2n$F5iI&AiQV+ktJ(+AP_dBBB&3ihdb+cr6A+n1+9A`{#3v}J7Lm!N zO40%+dUn@dLEn%DB0pt4V=^nP}G3zu*sk&SC7Mpa8PmbMJ8iEPRW zU!IEJIy{u;YH~M~jb>-I%Cjrk=z)G?g;%HCt0gz54>zHbkRp>PSeMT=Va36Oztx;v zB4a$a7~#=8NpWy1nd#O+juzd}r^w zQchn!63NAj(9!V2yD5>$lwL^96f2X@*psT+5?!!CjgDR24$(Ikdo*(`Y{N^jy=SAl zxJ}{H&Vlr@d41{o>K#TQy;>RA+$>MOYK2NW@&J#x*vV#cZo(}WC=G$Y+e6syI84?XJa1Xn>_AcIje zr6$loAy4O8k5CF`qGY|PMA_b+(m=67U$bggQ6Eb14}BK3W{IqX?Ncsh{jmir9Ifof zF%2UI)z(yhwTp^Dn_7#h<})%VvEozJ>y*E=qt+mpCaP9MR1$maF{u#n^SO~2NNdfd zhpO2j`sP%>KG%UXuY>j}+2W>KwIro#zFgAr5SyYvWY-ds+1AFz*cb&OyDlO95W5x9 zxh=`W^i;{XcDhYy!nCrA1tV!Ke9~J$*JM|<+-jW?xo-)g8k;Nde(69-gLJLs#Z2m3 z5lg1JXdv?1cn}q8(VFR2YqG54sf9u9q3QXgj@P3Wv<$I9R3wqjSkFoV-Bhg}U+9v5 zN!9};trsLk$P@Z!noX`&ndsjImn@f0n?+ZcBiY?VK@x_VuV!L(Q`=hSx;}vI-8ngo zn^=Vsm5o-g^#N=dKl(}Cl*qh!tZF8fbj&=Zo5>W-gw`*uREgr?&|1lD$rOv#a$aXA zQ*tVM^!AVL+HvKd-_^bLR0>J0KG^D}4&-C{H`x%-iG;J-ENDpD9U#os@qC zxaggX`am+H4>9H%WwtOJXSBmk z$nwP$zoR%0?1;f6(t08>9np2$ajB`aGG(ilyj_%h#^K4Fb&!)9mNVCFxVb3RZ!+t{ z$zUYuoQ790GU-t1P%fEEm9=Lc49>tK_h!64kj#5)ktueI4TkeKz^- z+by^biLqHUSuo$AD{hh9Ub=&2zJV~%9?&b1H4Ldzp`gkMC$^&p|_e+ z|Dpz@PhD%iJxVS@vrl%#Q*1%q7&*ja60G^hlSQvzOp_%_s2;)%oO#8rf@Nl8N~E^O zVt8wuEGK9tGTqvu*9Vf;Ae$s*d}jqZSVUDlTY{C;#!~-EuOpPt$dpJg2*I)_Z)Rdi z8aI6nTrI-Nqi*w}skUA70<#!gRmo~FlY27m%#C5n!`dS*b{lS~ZDndtCfaO{MuIv4 zfZ|2-hG7rwR+LWsVRFDeDFdms*?5-~)S5{LC^tZRC=FGrEAl9&5^5gTRHY}3N^54S+M3rcvHm4Q6CbjsW)d&;3E9TEVl|Wa za;3ybNwckHrf~YoRrx)|_GIK71YOLV5+lMa^VwU!h^etp}sJEeV9liK0@xEg^2*s5-c^gwqvm4Mz_WNBL% zTsDktn9Pt{k1X>&dPD9VHn!>uB!UA*+YPaEHYZavvC>xQL>7kDx31l^<=s|S<_deM zNab~9+5?Z17D}}w+cH)qx^m8Bwp`Lm0$Y4)nnRdOZEE`d9Mg4f7I6YrYJp-f<=yJy zy|5iBQG8!_Ux@6hMS5H|ZcoazJ8MPERYV;C-PuerQjEXrEWqHM2Wg z)xNb!cP=DwqdRBMM}jG(gj!avo)KQj>>$FEY zOmC!RUP7lb)Y7R8wY+DQwr0*en*7!IbjG6Q8^bX77KU|AF}&JH2e(q%I=pF|8B)EW zI!M4vYDQWe1!)@_r9J!8=0q|{>li7m-Tkx|$Fz15n0iugbu1WZY1ZT{p($fRSn|mP z#}|EQohG)(`XC#noG>dH@74>Y%AxpM!eFvhBE7pIAsZxef?#6V;85bs!sy2J>xXjF zBWs81cK0S5LbX>ju?p6JMwS^`4EDrz_&`iClavC_W!b%y8SSZWEv;`jf4#v-hw3s- zB_>0;w7ryRf6dah^SB2*txn}wI?u4FRqeFQAIM#~rge=&)YLBwYACdL#j^F0(l)K6 zf0^KC=w!Xnnwhr7-h{s&=yiWcoJ8S6iF_7>rMi}Ay3Z+`Gq}99(UYihk4-CxZM{Aw zX%ju9@_jrq?6Rw1Lo3%bZd2{qrn5SB*1zd&!M*>Hg%L(qk(E~8cTE4Lt)Q0T#hy%} z94%u=dkvM2CL+_h-RA9%1%sIGjLxGF$;Uk#UtL&)bdhc(wTV8L zI-B@{b~=NR?hUV4WTi_o$*0E)mPJYPh^0L&-f>cSx2Dbx?>>XdQ1fEq^Gwh@Y270! z>cVMVR1nj@*j`eDk>+ykdfgzR8vN?g;89Y{bD9SSKW$U#wcGuo}Iyk3e!4Oxg z_8EeK;uy6f2aC8c6v5O9o0x0bubkCIa&;zYCTI24cO@*NwRFY$Q6}jMlVa|vteFfr zs#fxYk+zYZ{!RPIO_-9_rBJb8sLGlSIhkx^Q3-x|drlgrRM4_Un?t|Z5{KqXQ_=_2 zieCfLNNG)H390oplXY8$xf#pcx}Z)9Y4c-y_@s^n@;V$1wsur4pf7tD^HtFW7S(a= zTdgPEl^5HUo6^*5d}jr86f#)?UU%$@tT;|(6-3KSJ$`&=_f=xRdLAEo^c1B+TSHe~u#nN6aRau;+yV28h%R2;Ge|fc&wn3~&s4x1oQ0d<^{Z%eb zx~+1J{j8|cIwTlrpNUULGx6zYCO*A4)J0*04ibt@sGB zW`+!5#gdyM?mg$kG!u9u^iY|wR!H7Z%XqPL3_(xQr{Iy`FsgMg-3rcE51Q*l?$1X4 zdZ%8VS@BueooX#5Zq|afFv!r3=OGysS+(i-$g)v|{>>Ech`f4{O)pgnogAkYSB`6k zG!wj{!Ei5o#@#&yzxHC;97Xsb)ezO<8;rU|iNRcOUc0Q;a9Z`JWteWw=;JG~)=+QL z4JIt4ZxgN2$@J9~pqjmlD%h8xne6gL#&wsrG5nP|A+47(8ZO)qv?vy4~Hm+JshpV7EKyT}6DbR5RU@DU{urLUf$4 zKqD56-C5>(Z0Lq5sk6AjJ&JLI%_an6cOfrR5IWzwn+0waofU|z-8Pilt&J6b@4QnE zSngSWn`rR%$0BR@9$lCnbIsCkCSlA~M4C=d^FEoW ztI^b~InFH@-0lo})K#G)Xeo^Hf^adhI$MU$dNxsgYc)nJGyEN`517rAvmHxzw18~T z);_DV4g7USZ)9Q6QrRNgIvdlQ{;aL@=Mr_jf0k7}zUHK6YCkikf3s41tNS1urlGTR z4}(iETa?-)Ta=DAf2GTpmE{Ba$R#US!S8F}A}d>FQ7)VCBAAgaC)6KKgc;egl@1jG z>JMeB8K_NcXUn!s-Zks(X0~ig>s_-9wd`!F*>X{P8LruKwX72_!N`{P=$O|v8&wC9 zWiDd=MsIvIUZMuFCttI(d!khxG0K*fQt@;7@+CI&s@c=r!+YV=;;a|%XWXo>#2(Gh zJ-O(G>gS5r0uwv{_%mB;i+SmGkdkv>584~o^X(Xyw;9c)9l{c zHM3L*NE0TaE>|(^(R#Nx)-S8QvwL-&e|E3+5M6VvS`A1ihOcpCRX^oIJ;h8Bgn4gF zR$tKo$tx0D5W@2wR(01*yi9m%NE;lEuA8k@mXO?y`*%dVD<)>^Ztrr`2gJ5$TZqYD zeBrj>06U{oBmQ9r6`ozD2myJdT(l~Z=wT@33p{1csHfGEF-__T&0-THTZ@w#L<&w$ zm-_Lfb#6A7ltbr|@+@$p*Cs7FjGd)%wj9(G^Xq_9pl-h_8ipakfqB z^eI~i7aX5oXhm5!q}zG4(`gxN159l95=y7nX_Jm2;*^IFSQ_43%KVz@?~N$pw*{u zmihZ~yZ36(1lOn;s$u6a=bnq&f?Q52i=0kYiy z6jE(2(k+>i^ohz4(=XLqB_$nJo2y{0Cl?SiskwxikhEqfXZ5{FP8zCMZU7gcekPXF z&!=+YKa{(mz7#1lDiR@r&fG;NIbSA`lg|@Exn;IX zo1vT=xhg9#HS5f$lB-s%axqm`cFuegIjzzLY-KVRj}Z$4Lk)!{S_9rVS~?Hd25T$S zjs~|H@)ss=m1y3sE9S~dH)a;r>K9$)NuG7d8P-i>k|MJ6Hcw|?3^6*kcEan3&@*HR zt-Hw@emPXV)*h%vx9XAdse|4ydO$6uZi)rH;jJ$h32kO`=|^M5cpN-Ujs?F#AXHDMG*B9^3jCYU8rWy_q_J-KMx!YE5b-$_2& zu^FQeMp+C~sVs<=S|u79ebfev_ge`URSvf-#X+yly2!QdQP?))JH<1qz1%A!EG)~h z@yOH;P>UczD^sSr+=MT@?3MapoF=onMKhJWXyiT3I9ES&ab!!u+S?@co&uj=YN~V^KZ~Sdw5HV> zhBwLu>pqZgEJc>RB8!i0yl#pt@fv6vQwfIUtaY}S)PU*{!PXCeR9n4Pa)+C&hqUYB zOKrY`@s6l2leDWOHe6OU-qqcx8Lg|arjCSf>Syj`x6Q`4W*F-h@uDd|2P%@>Dy zZ6Z>zWO`peS!aV=MXGh{a7GsM-}N5}MI*K*BXpLJjQEYW@c#)x;zRavTNQcwG5M?Q>bc)UN^Hk_I>9kKVX{An{ z5Q+3jN#c~%C9Wb}C7m>q6u}lVJg>+sc6(V3MzK4%H6x4f4s5wtF?_>TO!JYDyQ0L_ zK_G??YTYuQA%TppftJ;g#n6lfgRM0WG=VA`aNJ7L9-Xx?;io1fr{otWaJgZ{Y9>$4 z`~<;}M`<02VkRxaT>Kwe4Y-PE`3=v{J}~2ux@D4?nZuBuzp%k$EV7C+(w5t@akiEzAAe{8_2z`l^2CZcf5{lv+Ka?M zQQEI!jukTqfe`BXjy%nL!5fZRPA!8lhYZyn?4p& z$x+>j6AMPsW-m;NzRKNI`gD4=)v(?##@7+_x%5b8h5J&kr;de-HOC~T)`&Gyxk#H{xo zT@kJi`m<#8z?armsn^-ehT2D3;&4x+C0mQ?!O-VXUp^sEhmJO}>(%F7B?I zXbwK~%4CcBsjo=Amo-OnDXt5)UYY)jH(eQX*G(VX?~5Uh(V6{(P$}g@G%v6luyV<7S1Xe67Q2aoRZFZ=--leuSzV6(f*$p(p@TPb*z7D?}TosdFWXn1%FEF{7?4LYf6gYtC}EnwRWjcU8onR5jn~OTc7XuuIw&@nM=dT1w%O`4h8+ zOQrrjdMi~oXbw3=Ij#+9InIatGFmTdB`NDC!jkto+drH)DTlm|MV3z|l@s=*w5y0$ zmSxt+>iZT9)$kDN1K8nHo|;)U-=PT~#M>NSFuXapPwD9^q^#+Qtf>1Ci!3vEdF*r4 zaw2NGNfX)SMD6246^C$?1pSXnDatZLCW&iWVp4L{X~sh`W0 z!(0_7mzipk`iG=U7ULWFr%KUWui zVZ;`c%7VQ(6^WE%Sy${eQq9Ew5mqc?(y>#AurJs#;ctqeg?Ru7gbxa8rd!^qX~^b^ zF>T08M!JPTFI2k-H4`iPTtIAFn;%&i{k!>!T*|r}DGHQr#e&wivO-qwGFm8GzfM-{ zbux-G!)D;HSuSgl(Yje8SvG5t(fV17tVD;f{bNLjBeC|3efXg^eq&7<)X)zQn{?Fo z6g1x;zGm?<;ri9*f*B@GBxw`~i*|j9E~3A;WJio_sU585!9CG9i1 z@>KyjV3WgYGyftrhUQ4FE1Cl;W3vVCyBsXnRV$IcfTV0Hq6>-3`GQSW2culj8c@F0 z)+bU9mKbt4&4ZfFqJl~vYj$cMF?}G$S3iqL8yS7qTrTpjJY3M?`g(ua^PN@RdX$CseOK0CM>tC-Z`K3#9ED&y`0nve< z*g65AuM;6#sU8g3Ond7!hXq3AZ!4}tMv0X6Q#= znB8GLZ=H?l3*W`EH{A^)_=2O{r>lZ|;kcJ&DbeL>m%7eHStsniu~vfCGH53{3h53u zU0$xLiul0J-{vUGw^g^bQyzWc>bB0hP+6-m+HV~ymG>lkHb1g3d^JpDVbImHdy7mW zt&%V;@3FE}?GmSl%^VOHW(I>Pzr|Y7o)|G7_%i83;)n_b&aCK&eQ{gyLI$fL8695L z$Sn7H4Hpbm=?RwmVsfQev6|^!D}Dw_e!9u-sAfyF*9E~MDh$x&$D@Lc8N9s`9c)Y; z`$?P{Xn3`QB~hv1danMyl znIzvB*;=u%iOFzlL!t=s+SXftASOh(11`E14~NY@gsICZUY7a`v|vbH$whwU=!kW3 zQL@SaOOR^Mq*mGK;}9>Ebl9xw{6G{(sd<#;G_{a@dLq6a-Pu1q5ur}B^?vmMpOdnB zlD|pm{PX>a8I?paEV-?jSo%}Cnvid+wVyzw){$Xs6uUB_V!seoNlLM)sB5{R4)Kcq z5}thwQ%Pl+n9~CX%UWjsX4cx5s%qLygPP`i6H~^sa&R3uQeOESQGyx2C)0|$(OT&& zC+%m-)Y5c1sU}srd_wCl_QIfq>{}hNq^__rRz-f!PQTZw>~{AxKL*L>m`TOQ*92|R za3yC8KVAJtc|>luwzFnd3X}uOlVEud#srUD-2z$($z}QHLzSYg>N2S?u*c`Y&#;D1 ziwar#Zkc>*)D_SqwYlW_AiqV>CH17nx$9i*sK-(9A4GB06)0LL!W&i}h-~T2E+{$# z_~IZ#Z-k#^v&A)uNDqWbd!c4@+iKWmTVBe_eOoeW15-`y zlWf(z`Dpn$9DNH_Z7_(*$VVSs&8+6dZ|>b>_wz+xf|=uxpgmN3b6Vr_v%a>f$?ijc zLgC72Ph9e^W)=p${x{EE?WX`EEBfF}CZpwwMa2ykCZ|6gf_ShoGgAF)CB(heerMdRo7y&hIkx@& zw!7OG_>ZHl_inuZzK)HtP4|5@w!Q7E+y2%>+uHB%XxsD=Nw#%-c~g6=~gTnuzm$v2h&F%MpMBZ$-Cln)n(DR%sX``f(QUW?E!#eP)3!Aq z5x?+aqSI{qh|_QT@KfJ!*Y)8C^Nk;R0rzkDh$~~mhaYX5o$5o6M!s+U$PFF$e&xQ{ z#*X_JzJ9VaBId5@aQEB4x!@o%>A=VK+5~Gz^Yyk(U*$<}ly`dJ5krb^eB&FG*Ubyx z$rx)M>tEalHgBQ|-rgo{z*jnW$rhfupJgF9>*@-}1K;FL`bt~prjIx)+qt3zN8y5) zPu0pTlcxc*Npn@2X+Lbz#k(G6c?7j|1)8Vhk;TQGGqqkD-;;|S_vWT`Ve z8uF<-+ZcW_mM!A4MWQ(?Y^II1pS_14APN=f9{DvL+>x3(`pjrgI$8}L%rF(cCmlR0 zSn~5MT4U~Ee$c-*64TcRi0NM&?a`0q`D@(>4F8>C{Y5yRp|S}o{)!9Ir*jsB2zb8^ zw}y>27!$dRLxdge(=-jphwD;qv_BztC@EO4^no}E#KJgt=<%y|ZtaKkaOn~a+m57uyvr)JeqrTPtm3iT}5QJQ9go_J?jotGsQjH zcbg73Onj+D%(XAR%RZ71Mql_Pmtd&s_2};!ur@=^7IW?6m+Ez`YF`g)N~Ob!p9~kI=9fiFd}6K#l%djsD4T(dK0n3qW9SOJzD$}QztcT~)yK@J4d)`O zFRLDDO%|DbOd9wvdDKi&hSi&~I=he0U?ltcigDKO>Kt9o#A2b8Kj`{^**a-iGyB4C ziwC2xWFC3@-T#YQIcl#xIb?(dcy z;Me}t(c{{$i&?dv>X#pyD<#D(&@V5cXeRH@iOA~rm4p43`~BjX2|sLhMSxF63%aPk zA19iA<|EZTuPuLLQk~;3Gan5BYFItv!suLCM&2Ygqo47J&jZ#>EdMU4U!PgOeKW87 zMP|SGyJD{WzPgj&qg01{KVA}bsKp|y-~K&;er6Gvg_argQs^A(q3hxa_uDWx<|?B9 z@{Jfi3Ep4MGWV&A75OsMR%QmHAOBiUrM|l9*MF9xU#A)LZ@<^K{iM1*s+A;E3+Qh{ z_4AV+UWPEWdT{OUt7;MG*H@umMc2dh`*)ytYoywXxel0f2+^asipWzLD9S(FqlP)b z2UzoI9*=?Ar|g(~#iFTXm75w;A-W+49^j*PtB3}Q6het{|LTDKQ%ENK)gfpYm2k~E z4vqz*RSg_&{x2zLkPeNm1|y(1;ksAW7}?Z5`$zU(TPe0zKik@C-<9vxN^CEUdH4i+ zuN!-Vmp2%D?VJ0UtNom0^pi4sbuq)D8)BOgUMToS^*BPzWUuu1!VY$}Fo#PDpUuU|ql+Z=a;?E7 zTW5Q2S*K9?hVD_TnR{6}T~6WtkqRKTAhfq=lbU;r_RCPNdwFldWm%uWzM#3m#tw6826Eu0e2&bSfLP0zYfHpza-udwKYQcN$y+`r zw;|Cn-Y1qImn*d$VzQBc;HOoT-!(8zBurB|In2#FKg&iwW!FIK&d*BlhT_k4rHlEU zxz9cPIegw8xREV=ltg`AFsF<6eplm|AjkCc>@R6HvsB?Tn~B_$;# zDFr1@Qc_ZEK}kW%6O=rOihbYLb)9==AiuBg_YZJhug`s5=htLY2uNp;yY0q|W>?7KmaeXj(TlSc z6|yAM-E;aNKs`>sCU(giI$R<%?{DlfbL#Bt-_Ygex~u1oo?d(PVul=x#aG2C-Yyw8 zr?PVN;+wCW6uqj#-goyY_xknlX^mby!Lm#YBzaM@7K}x@%|$O_k$#5UJxbM=mXz`L z2zit5n?tdY>)h0n98%UNE0%7o6uN@(6fZ0jP%t%+)B$~*U&{8NtQ&iZDKF4wNbL4g zk;u`T>5d{Je;XE){ufMlg~}MBV5929>=01ygX9WM7n;n;A9vN4*O-4{COTcr+ZXis zfAOw|^Ew^AnqXN6Ard+VUF@N4q|>fyIsU`e-NjN}5=YsStCF3+gU+qKW6m8nlcRUc zdA~ld(WlJp-Z4j-#yjRni+9HysY36VBhA?zbL0)&F-I0R@0cTP%pG$+D$m=-=yRMt zv9Ug4yopTDwMou*IWkpln}A9kMQZg-cu(ladXBYO7t5b^?d&ui(wapU|A%(Et|%Qz z>W=U~9F8RV#Y;yIntbg*i0@#ljrOnM!d`R8ih@PA>S3~r@I-G}715U(Ue3b{B7@~! ztBXG{3|l=f%yHmRcz_Z5>Rg@r)0RcK!dVgWX2SpS!l%0R(WhG!jrD()^#=QMY@h#g zY-q{u)3!cZ8hiUl(UkZ3KgOCb&2n*)ybu_U?}20b z<)i1|DtSnA%6P9!lG`DEJG%O0%Y|}!p|07ivgV)+9 zAv)#XgxWWEu|f-}4t6E3u#)F`_pMOba|tcnW9toaRjshGlw>yx<4MYfbSio3<*`D$ z+WRaWdQBTPauFrVx4LsJf&MX3GW)p8($rw@%Uu z$UT!n{Oyv;wj}7s>g=5u!|Nr5SFd)Dq#D!trE4*^$@zY9`ZV^%a3DmyL5{@ayiswc zpf#EZ?vCt}?RwPIj5V?5o=AC$LV6jbQrY<~)_QZJP`RE_sQzbF7=M$Zu+(8fs4|r- zRF5)f7o${_a^E3OxvmgG3(J#ZdpPlul+v+KqwQc6mRD_!F}DZ`D_02$l@l_VpOZH$ z6@)#hCi09H4@ocOpJHJQD{aQe_`o>ne-$|GiE-vT%}t8(D1pU;6bj*evug&q`_DL8 zEfmgQiJE1abEL3xm zO;_;N|5D=nVsc3x4mt6;Kva_}=pg>qIpwUb$BJs6yX4eP23eXYfAJfAra0fOUhyVG zvPzzELj&~|lEoy1?hH@+lR}>9<8n4JXdNw=sEI+8Vug^phGVW|lM~q_VYx6qm*kG) zoSbIG-$m3)dMQbXv~ZuAg_c60HJut|PTcIJ`ZQ^Fo0{5EUdeA{*qv$S)Avryv(;z# zkUyNNyBtL!jQ&w8&!}(RyP;)5{)a2~c8I&}kkt}NPgKUY*!p|Tl+!r_;rxwdu-s8* z&zSVYMYtt|=R`Bm9rfKWagsr|*i((zAKCQkv4X+>4_7U;`>veI)eFePXgfdQ^e!=| z+#n`IH=e`D9brQJ&0w(7#LA^!^32Bc0&rNa_mU^`88S8qFYAKS+T@gqMQ*JUht{NZ z_VPVLwbGllytB-!c$UARXk%Y=<(0T-`H}mrFfifB^;R(9^;N=Bz1T%nO4&RGrA&oa|G-JBblP{Pb`)5~tKpmFE+71IUQtLSG1%ypJy5-xM`${cFZbinCz;V_8;LNhNc+6P`(Ch>?Q}Nyk-J;Sx@6dG(z{&5 z2UVtSNi$yd@#Lfe%HQSUYP~hdl6CtRWZ)#xZsOap!*yZ&+^pM z!(o`e;i&LDBgZkMnp0ZcOAh1U2kFKUw;XuFQ&0bPF+G#p6KVORvJOw;7EV3WeWpAR zufA}*Cj9F>-mMJo%rU z5!4UQiH4J7pCNiBJJg@>%tV8J@A4#dax}9&?UWyQt9m$%8J@$K?HOwzp?axhzK83t zxD;!?IXRPAp6F0GQdxNFWJq{qvP{WHO8qg&F!KHCF~$%%H-s-d2%Ky&qb5uA?2Ql3>nID8@u+$5iB;EZmD&P-NcCwh;-Vm?vf`BxFiae zH2MCv7+cXmo_%scsjwP~T&LrS9y%;nLSulT#fE7ri5>6cw%xTORKF=Z_fw2gZaLpm z9x|MV+7X_@$mx7abMll9yzcg}eyD__T(AuSCY9>5DF<0X37gLFpiJE5ejg!nm5)$% ziUs{ns|jOg zs=?_1Mbf5sB|+u1G$sn|UP)yb*c3ide@dFK45%{yqZ?*toDq^k-L>|RBg-)Iw2DkP z@<3+4 zB+sfffA$hr?JFwr6J#>Fl+RhF?$jejpL`A(BZ!_cCX{>&&k=)b;%)HgBALW227hFl za(tSY(>jC1e-}isKZVOUrvAMT`)0(09K$8V8ZG{jqrt4B!KxijEj@fO#TBfai6xVk zROV!A$Sa%rsf$*W+6PabxV6&wdx=~L$&WY81#1K_0%R3fzkj5Y0SFj7;e zLA7*tNVO?D)$~LqW2MD0&dyLWUbMrX4P|8klp~VFD%(Y>`H!se;qb#w zLc>ztH!kyoHhNvSO6aQr1?&{jDZXrpA7 zTpcGQEH3gN8O+kQ%Q-&s^j%;*DhIQyp9+!H(U4NH$^ZKMq*)#tPF|Ro&}kmc%~)Tw zHLQ1#Oe!`rt11c9qjw;T*LbGHM$g@WTAxzR(_zA2kJAxK&8es52$92bgd#gU`UXz> zm-1wkXh!KT7*}Ww!ZT~c-p2OAu{p7L)L|BWuE7466n<59GKz$;Q&5Cs_Y&VH%}%Er z5X$>TfyhZCMyLu4!+fz93%ghZ4^lU%v2Q-~d^AspW9)C?%cW5|<}F+8!i=a0P*J4&z~av?-E6e*=&E7Z1w z31^2?2q%RMY6nmVBa-bvi9ADPMH%mw#?L#E2ikWFjeg!EG|I?NJ$HnSCg(&*U~*kQ zXDN@`#Ar>-Bdia_lOM&w=->@1M>(hqM>Z&xmJEA4p#fG;ND#`mEhiu-YbP8CtHTL7 z-#`p@qyZcQ4KCO*MwdRBBj7j#vB*-w{RsrZbV@eL*#hBt0%FwHCFcTQ(5)Xv?MpxP z-~Hku6TJ3EK4{Tj_{F62mi7;QjQl^Jr+>%*V8u_zYy>P`XuE(9x6%TN+@#Z7lqswPazNAU4A!Yuv))gNMx% zNe!<5#D&-&ag{-WQhg7;s^IUl*y(>}h5DJ|$sh z`#-sgt=}SF#ExaslSWt9Q0VEy$+!x_A6j|ZA6SJUwIp9^54!KEw!W}rY7df!PLjyK zRmBr`-9b7SH^@>fPbp&3i%~ZJZ%{Q+z;KqrYt2^pw@oqYe4~~=`+p{OU7B0=k4%iZ z45`#AXRTL6Q~N6qaKf^-BqY4yG33K#ZFLD}B-Nk;GaIw` z`cerSf@M|M{_>_=j)aACXZjZcT{T9V@J|2*j%tD0QJ}#t{^Gx^qodcSo5aO}YDc$$L*%cx@&;`m zxKP>r4YiHhj$P4Qxd$ok8tC?Eaq_#T#hLXEZf8TDlw#dAErgYmJ{mCwDB_1DwRZIM z3_VS0eK6%Zsm_Iy6$4$Ok{#1xk)LYDpu3{`beFW4B*(fL^-HHQe_y;>|1}}=2;ICp&Tpp4l3l|*yUASH5G+rbBa+Q&JY_9Zx8e%XMRnb8i-{JXQRbJ3 zPIlYMlkPP&8=Os?$^KXj(x+kDsy<{@jumzB&1AN03Kg!4YD*_X*$@He`+MQuQ*1Ky zKm0yZV?-LmJ=<+6yfmshS;3=E<~`W;qgzMC+V>A+1E?5f&nMIt!fZn)Ym7yE?Oa&# z^(E`5#U)*`vw(4g8!+%KZ!Njd1yy6K$5y)kU%ye#{ri6N+1L#&1CNiBwYG6m<&3W! zH?y-{&MME2qwmdsjg2Ek;SOM01y4BO&o*smrK!)fiRFWsO*3&qY@IlVgW$>H9 z0i%&&o>qIBa4xb0tO3Lo!CwS$eb3gTcD*z4RN>;_E(gcW~-2tQ~$IA*kz zIK^Dr>*;1sPZ&Le{1EpuR(iVI=-Y-l_qGZ!4a^5?z*c}SGrxm4-hpoK=<(*Y@W>b%fLQ?Z zQ2Y-);M}lsFwNp0Mx2sA!-#j-Hb6Sh90sC*aAzX#%=KWebMGtzH6RBz0c4#u9N_mX zr)K;M zJ$sg?TTIT`2e3QA=QSLlOIZ(C1&Bx9LmB#X)rz;dt#>;lJl)nxz~BXApm+lWnIH#qLxdn&{z%sBN>;fm9 zy8!%3SLtD+qmUuyQTSJi9HAEt^K^!%xL>piYz2G3F|)t8 z%F}x1E=I?TSAcB*`J<6B8u_E^zGOcROYo{t3@MUpHn8 z*b9z07aa(Y9bE-BgFOKIv85mi>Hu+$-DKr&>_O+o4FlBxw{f_QL!WWm!C~jd<0jw3 zcyt!|<7a^!AYQfKW3+OJbCp#fZs99?;qgQD=*dPSdHw<$r+xz5;9mN1VH2gs1f;{|e%|0(n;)wsc*I z%qypY96*OFu@_oXX8vn%t4V>CV3%`O;s2^AsPl9Q6t}B3fSrKw@5j&k@$>$Rxd zfg)2W?o-fpN)5n$3T{&fJB2h%CEV0X>LJ2Ttpyo?Z1FdB6W9fgP-mArcl8iY(L>Fv zvBS^RI{~t;83;)GHPv7iK-M+O0e-IOckWukDhFfS8YA$ z1#1BIwf#mvILy-;PtjT2Ke)=%o$v>py8+#AAdVXF7TFfO9jDJ!2Zk0Q}C_297v)<8Uz5+NT>+@VMQ$9UOD+rgAIiH_d|2fz<%Fn{bPj<9v;EA3Jp?sfgneTcX} zR0$GbDOd||`_NubiCfIKmU)UEx6T5{x|O`VbpzN9@HZz4rUBgMtO45r`6+ZRdd^LN zEnp8g?%ap*`{7k!mvgrbH2d2s;p1SXH}5ohJK=Ai0hWPn;G}c)=u}?~=7L_Z7NCoK zZ}rF*dPg~!1(t%GXE=GK@3V>TI0SF%>e2nlh!rnQ;Q{3+qRtP7!<^b zM=3hS@f%+Q&^><8Xv1(%Ydnp6y3|wR7XJ-Aa56M8MqDuhH zfi+;awO5&A&b5_;I)IF}C15@1H`-q6Ts!XVHJ~2g-cH)u4?5R@TSujRe;w#4`N}G> z>sSWxBkfoR{^kb&8PflmKMRmY^Vfo%;FxorLqHUuLnrb(*MnW)uyff`(>qHVrC*Rm zzN90&+|wWg<|*-rKSs(%iBHYQReIdH+%QlHW`K;RD@^a)R;x#H!au*{i%DR`Mhft*aUVt zw}fy@rt%HfLxGfwB})LZm+Ue6arFOq6^MhSU<1JIZu}~(rd-xwCeFLj>+UU}-?@8` zeNPn3uyT73Zc={l*~)iY0Y!#ADZy z?!*1QUa$si2S=P+J{%BsIr=SM3JAY^GuUPEE<1J7YP4_X#m+@K))~S_U4nMYmIYXEC;i|QY$xK zM81@pFK+e}|7t$r+^XTA63hVTvI@VeNUzift8f?k-%(FVr-(vX^*EHJUwi5jhC}# zt~YP;RN^80SI|Q#`YQGDd&W|h6wER?U!QN~ z@awBQC0?mdzm9C_XRO1&#J6q~m^0yP~W96 zBSZQj>$igg&V3^Q`29vbSP9Ti;`_!4=e{`{Q~~t(<`S?T>;bqvQcnM&4vPNL?|7sa zAo~&Fao<2VsV6to+PGmu4t@8~@+N@3(h?W6o_PKQ_()J=PE3h}%ZwY{X6K=S^kie-mNTxNTZy?e?Zk_PuW+ zp6}r2JGg%b8Q)n0$eZsRaqhbT!0k-Z{awqT^`i(zb?^u zzesty#M9NDB3t@DzaacC(Cul$Jv|kWwx^c@mICabMaG_C_8spbzCF0@!H?4Ao)V|@JNFQ;)Wds@ zJNFx8{RX|He*F#c4A~4NJ+oIr@h9V{-yE^}{I}@$Tk`a`HGnX`?XiCQZwVvc!*BP3 zlg>Sd%;(VmxtyoOuV&(x{>gLOJ?;1Oxb=(nmN~b#8q}Nry~vkvd)ESV*?Y{)zZ>G* z?@B; zz)G+geU?IzEB(Ji2W`IK5PBaj19hGv`|uWU#LRyi;i-538!|-h-`0Swpx@fn7m)G7 zG?26TgBMo7uLZko-RXtHd`G>`y;us$0e+PxJVlEsYVn3Hj^9Ect6 zuah4#{(imI%F*k{dwnTDjj&8ng8AS0Q=0K~C3Fiwe`w$adRpP>EUhO3 zm%(iX5I_Ac2nK?3FcshytX92)V3(GUAUI+)QcnMNt_vbHAOTi+y3NxgE+`oRW`Pty zclsMa$yz{MC5Md;2wX4#e*7*9}!*_RSO{qmp`|FnleDf*Z8f;HZqd=q)4$BmwWKkDb;jA;P<&sYKocg9vg zp1iFLOadKyaTb2g+U(8vQTr1{hnIOOegXSQj4ttX zwWr%WB@N>5U8F;4m8WyD%YhYIPY3TpXEpajPq^US(*W-8UJuaW?12C|XU_-3arQ2N zzcR|lr9Du-Po+z}{bo-Oy5O8rK>E)?<~h6v`VGN3ggIvw;Jq;q7Myd~%;%!#xz!*A z$ft9Wb1w0pd%^|hjR44y{5y}lJTC{9YyTxUZwveZ7mO(Lw8m59sQpS$$rm*rG5Ve% zI$jUhn-aWd2FQ3y`DDH;c+X~w?>)P{KhcAD&M!Cf`BN?3=aVkR{lWRmJoVwu-)s7f z9B6Vzl3(I)WUaT)nY@v!up&1K15t zIN8qrCAw82 zuW~scKPt(82|t1S8om;W-t>!t3CNj%p9yQ7%*zE6(2M?EFoAp!I#JS8D zBY$E>$5p{Z@`rItFmbESCkGSzO^=D_P2C(!8s=%#(}cNCA|E!Q*QC|j4-6)ehDrS{ zV82XIRR)MpDLN`$=ILfn#V`IYC0~`||I&JZKPexVt^xSDYy_wQ$hoW+tO8pBc`S7D z2v5lm=B?!X}-H*87a`NtS z(k=DF<;SC?5nTwUYMDNo7IRp@{91}iUD z_q*VlfuPdduc`Nxv|YnHzGka8lfG-qz%);Lu_vw9l9p@9pKFi1VA=>!YyPK^{%Nbh zc7WS;6_#Ju@t&mKxsLZN<@&mull6(a34fvamzS6Iojz7l1!F1x1axxu#rf&fFn|{ItGitQ| zAI#wWF%Af3ppVks@JC#5;}B2L?Z#PvbW6FvaXHuo(Ca4N+f7xV2S_@|>zn#5y*HiY z`>AumOmv-D573i!oM7fwC-YmuOyZa|3{-nc8fNu^)d2akki+_0a5Hh-Tm~vF9XHo{ zI^WYZo}$mqCtPsL2s7U@%hP2})_;Oq)>{2|3p(C%zy-4dGtVBS>q)_E%8k^YvlGru z$U&EYwP2U0$gUd&>YVJy2o633ZbwG_K!85=vjAc1H-Nn^ zxT6$ce+PQrF(0e~I|1>p>ncFHTleU?d(cXrq=$oQ zYoF4jGrb(_WDRpF^q9TB%rM%$UKeC4tlyTIWpXn)?C_si4|W3NwUMqi{E5D8q`NHx zh_`JkI0#OU+E`y zk-uLKpvPR08xCq%Qy2w}1N`N9kDu;`9yGe3+yx8Bg9W5h`nwC3drG{b--4ZhJXu)k zWZzG)5d9X;1xvwZaKHuK13}c{=}vjN!qe?KKNxf$c0o@mhyvp2S)%K;LC+fNSN8C} zdB*{Jd4fe%AO*MFB@sTY6T^6G!^Xlw) zi-F81ES_)u*u^X9Poc+RqFA^Ay?QzJ&OdmeY4aza>*Wo$u*d zPY)RVxcB$*X)gFUvOc~Z>;y-2pF?o>a2MQ-+uc39&oxl;`3qv+Y2&uLkGtR=WZW~$ z`VaT;zTR1ed5d!cm$+bQrKh|M+ z&};NlqaDqwIY= zh<>Zf0pVBgb-|YgS~>jEQcv;wWpw{?EkN#(twz5##8dM9YfAv}Njvv7^8ah( z(btEAY7hr2zy?qIZC-WV2p6owecfD7S3!d9zWkiANH99-$b7D zLmnw}vL7*cq}uwGkJQ2UfHhz{!0(3PU@Ay~m0%k<=G@pNF8CHoSXYbQA7 zf^U=FZ`Xi0z~8qwSwC9#XM8=1`LK;IHkP_zV+9~B8+*Yfup1nA!KO+uAFKw*-9);+ zL-~~c_jjV65>DK|L;T-a0}goe2^V}9y}w&!=I^4%#W~E&y?FyX@q8D568_OLKzxs; zJe4@bUg8yc(gmB5x0(3lJK2mZHLr)_XY&ykd=K~UO|^7>4>=O-+F(-r|DCkn>m_m=9K%K96lS_s2+|#J^<-hyub(dE2szdU6_c z6W9*=E!>uq=Kg~!PrY70Kre~!2O9wT|KPBhe>l(uKO6xl57M6faE7ND_+@}{FXOu( z62}kGo?M~KRgKc~d%a^*~C%oU!=b)8P z-o;PwBk}(PJBj}%Yb^Xvwply>6ZGoc?t&)+PzI{Z-;)W#q2H6efb>1NQ`h~1Cl9;e zso`Lnxj$8J<>{#&?C|&0E*ES^*7jL!B3|G%Fa)>fP*$} z``JM2cl@l}(^^l-FGeu6{K6|F~xj@{^N2d^O(|?wE4>(=mzE+DF<}by4JYg@zzsxJ#T*=t-7{ITNH*?UFW~M(aeQW7=s(h&z ze~fJEMHvIhcdPbVjMm!$h&C6?~p`(5y>Az((q{XE=X#@&6bD>UAM&Qy&#$Xo@arX~`MLWvKaZK5Uq4nP=gHIjyzKqFT<~+^G<}|(WPYG|eNLRF z&$DUoCtc*{G<}|Z)cbj~$j@o|Jo}>eQjA z(WjYkb3hL$a(hkm2;Ej9-^VZEUX%Dkw+$}f{p4l7Ch>-D+i~-Gt>KE}<6GdJ<-?sU zj_4y)nJ0_lV?R~!YhTvXtth_dYLHo!hS!VYd#C2|N700)f_^6NNJ5sme_*SFm+=AP`i{smjF2jr5isReGdy1>u$PRS*_mhmdu5-b2 z&zJn_5x(EOgTQ%UJeUbOz?B5-A!S9EI zD?tk&?C+lfhg`5vWFvDQZu^kC?*V|^eb2j~e<(m^KVka62sVJdF8IR`K%MdjzL`Iq zaKRs`ul_g{h4ekQ?If_0< zp9ZA+81Wn<4aZu*ePA7U4iNqy==u+2|6?(D0_=0aKk@(1NuUYb3myiK0p$IY^u06~ zj0D8{5;9-H{iSEYAr~A+-{aH4{a^>!S8~BQq~-W=7yRF3FcTp6|Ly^g0A&8(i?nNm z`xo;5g)aZ<0)+q9Mu3ce?FX;Xww(nC|MFsh`^)RV<6xf)P7DR30db$W7a;q@GvH;d z%cPzNUP0$q2+Q{!yn_2H$bEGX7!Pg-gnJcxX@8`BdG(o+yG8d`k5UKX@3jlTbkG4F z0#5*ByoT(PL&2DmZ;Jnu$T~?HP9pE*gWxfMzt;x<;(8tT*Gd2DUj)SS`qO;(xcz%1 zm<%Z6oQD(q8(seWRLKSJMdrWvxriGLy1+x=Sr-Y0f=S>`a39zR@E17?Oa`}uyTHTX zY4Dnha57J%WKPLMWJXFB1Kdh*D|y*P1|V<16fg%6&wxh&@eDZRA_LC@#53?-@DO+k zyyzlt84S?tEz>~@cmS*ePXOHCIsoAQ)>+^|u-Qch1)vhtgZlxp2JHjrP)a9CDGtq-`*I z489V~1Zi*|SO=a4=sJXVAbkefo5&EsY=C}49&?em4=Oo#0`lLE-P>EhJzyhv1{`&f zcT5J@zvGMGQGmRm0|0RjT?`%s*bl}3&_gal*E2HgY(ThSw}WngKEoacJHP=KIddeK z1ZD!<&&2J_=UwETgnj3D&;;%W*uV1$@GLm$B4-T%#CsNU&$E<7z3t*mXZrT zh>UX|1f=C$;y!Nxm<(2d02-K-}kV1UpJTbu)6$-{&GD2ZPaIHb{f}0WwBD0rtB{ zxdT@M+{xA!)I#elHyeH0+~y`=wwv%w^Qeiw9rhf1;y#CySG z0NHd|BNvVVGXd@w68^$xU1ZcyFuLUKhF41Z#Q&)2fVfB93(#%U6W}>;)I}~D1V#e% zxCk9D>H_$?Xd~DGi07i0T;$@x0QZXtd-3z&H5VB@8ld~=Ua$^44xRyrT%=+EI1kJO z9pHZO2zVM0zT#yUx#Vm>yqDY#i1(8Fz*8mH%tPl(4!g+vhJq=e1>6H32E_lqqb@QA zw=rYD4DbNh=OR(!jE)4?gBI=oMWT1XKL`jHeYWJQB0EalV~Kk#;m6(y7MFZi?8hQ! z><;jvi;Tm4+;q?c?gPjlN4W84fk~hXAa^`+$M1KM%8_6Wpw6dX9;ti`JPXiu!l07I z&R0rWJBee$d4TW}W`k~k>nTY$u$>4VIAb7Uqf<=UzbRoDFkQbBg0_y zZU>9O7Xjg}BHs632&RKHxVNNF{Jwu3*a7wf;+--QTnUJKN=wOi#m|)c0REe62teM|`(1>tedHQ+y=FW>-Zf3&J{@aCu6Y<9f7cv! zk!wc-+^Q9fXwT0zkUpu4hVZaVXsHu>z@J7yGSki){X>IKnu7ZYy^a_J>()E91Lay z>_7Oli`*~>Oaka~1O1>K>!1$+q5E89I`XC?Z~C=>_@>`ga?O8}hUvsPo$%9Nc99tu z0^*x72iyf720OqZ7rBw}H{yOHX}Yl+5buqIy^*jtzT_e|5%*2gK^hS5rYFGul0J#! zCS=bX3`T?506#PD1NfQw9Ke0nNN_EAw9@@C{*HSA z;qD+@jCfmfY|ibiWh#_&|Vr9QQcx@%zEU zV84qrAhY3YSMme=Hjw6qnE-to?g6B=aR4YUIak~p3Ezl)`=fqAIX(rC*3jul8jJ)QJfV4E9bdlsFFddM_%Abg!Ht|2Dr68 z3?47}wc6pQ^^l9CUCG@)$4~lffc*6J09om~z(%kG9CeY*U~nOr4A3EidxrQkPk?6u zvf2iL@!(p}0`39m)Alr=58FN(5Vjrp?YOl+^yXOn&9OLR?~!2fn`7}e$Ks5=)8Ia^ z4p48rITn9&EdJ(LoN;#-xEIhSU$g`42QM-99t>s!+Tl0H;*7t^r#HvqZ;r*^9E-m> z7JqXr{^nTx&9OLR?-ua?Jr;Memw|mnk>uUZxliQx9YnT$n6dg3*m?Js68I!`FS|%b z85o0^Uj%pdLPT1a_;k#RVL#wS{@<&6wd`V$tXs_mR^bJOt1;PKE^t*zF(%uE<(~no zFBS8p!dW**`b z4Z-df*P|XucSCWGs*nxu`kOwIG#Pn2--aFZWjK&UWqx z6&o&WRSVO%L-p6Z*Bj2gLGG7><;v%-sON>{HY@Xx>dN_#fV*ow zFCMscQ1ejO_62zno);fndblv^Z|Sqb^ahskjs@uj5E%V*HQEm{+$X4V^rFP-GA z@{EsDT|F;B+N35iOX0B6m*;7Ny&xkz8^y69u8ozE2C8b+DP$VBw@N?#kZDM0D-rXw zLCfSkE|!id+mLGD#zj>kzz*(I+y zZ_LSEcLj@yMeM0wCq_^6da85Ym4eI7i>G~PYFD@sTO#QUli(RH_|CUDv0?+fZ{WF# zP+uW76#Xu~Lj;N6f(Zk6Z;G{%hAys>Ym>_^<#xV=)@cnXE=2F78k5hl;31ilkE~#B zp+s?+tpsV{&P*(ok&7i*4wV_sNZYabJx$aM5MFt*xDa`T{YA<()fNO%u;F zba|siCN;MRN^$Y0Mkg0*>RZccp>0soz~#zKa+xJwVq7?w(CiRfuK5(Z0^5-D7W#qa z+UVZd7wVY?@ni<66LJlU8ui<2Sd<8Je^GOu%QGghLF7qGL9-)@FVZ(*r15?4 z6Qz=k@_9GL8{+!%LWZ_7&Rx*f!7Da2#+#cHsW#t>ImOf%iV#T{67>8u!Xn<3j~U_F z*pf{orNJ{bLJ>wA^)uFIV^c#m%B9j>6lAMyV*hE?*c68FVJ!A0AvE|+ad~@$^Bhdr zh>B&%HzrbPx#>}}tTE9^;k3?ZvMtw@mJ-p(J%l2OYf$C-Q?Y4@C$$dIt3l1eH&r+p z*Vw}Mq)yyUZPYp{vBs7rw$exEK5+GbsiQreYLr6W*wUO1I{|qXOB0#YwjD`) zUFw;O4LhX;Zft2Se8$BFc)5ufFLFJxP`)P{KZFd@w38%al_`ktpsALiygw=LjV+zj zd}iS}tU?Q+p-1ghbG^7&rJA{TQZ6`^fZS#1*+!~)%X}*PWJ1%^>RY%*&orjv+KExB zB^gdz22UH)2`hYURQ%TAp*-iBTB&R_JJUJdU8jv63iry3S{Z%0MjEBa$aSNlqNiLp zY9=k`aw)5*D7TOr$1RYwRQd*u_i`?UDd_R&*%^LlZ8R76QX#EP(4ns{}G z&3lzQHPwGxduK*JK7@$!Lg;AtV4fArri3a|V1-L@*>337^J3l3m6M^h=R@nU9W9!< zX10-}@V;lG_h5RS!l#`B8Lja7a?z-2oHwbqZQQy#R^EQj3YB)qbDfrj;+W^D$h0)+ zP|)X}j0%O7D>3EbOJ8N4YHZ{(TVFsz4l5}dQjs^>E7!d1NLe*uv{42~nhl<5?8tSr z`=Lh>&n52EiCUbDm6|{#cXE?#T*s&dwz1P%iAHV=S3f-+UEFn=Gc7ucOpRRh*c7B;)?*Xh`d)jIax=B}OVa$nyn{ zWVW?&F&y)TJYVFIeuyOnf1Vd_!g^m#aVZj9Kr4hMOe-sl#xz+A&-JwWT0CuP$YrC} zDbcVPC9v3X7d`VCQWn%m*IGWzCjBa6O^F5?h&F9JunKF@0_(YGQ&z`Qry8|~rtwJ~ zuTtCf-QyrsNMkx>Ju5LZQ?+{g_6E60)*CvtUJxH)p3pzjZ1U796MdedvZzlhMOPR} zmYTc~k73PMVBwmn^Q~$rHo*JtoQUx(Tze;#jaIP526!1i`ba%1mTfj;Rbb(yW9EH& zwkbg~q4i6YDp4jlv{v%GWQy5pIWOXy5)zfYdb@Pjt~9WkZ+P(fIECAqu9`t(wE2;*Y+}fQ{yvUh)BiR7@<TO==eRB8RaZQvEii{ctj5n&gsg{|V+q)MV3_=;H#4y&8aMq6JT(g|kLu=&rt+rqDQt%fqct0HAa2G}73~B&Z53@U)@Y8}`)d`_qWSg6>-+a!er7W-^hCnF`zwgQ`A(pR+dX^JgKNgNnGvDuUu z7RK3}ot7GUdiF+*Cb~OV43b!xLJN7AH1#soh&Vuey0CB8jv9;~N+h}&`O~|Q=)2{^ zWCll+ZKl!>J5EJ>b3C1u65AZlb~Pvbq(QNvS(Vdgb7M5kSYA}H;i@?& zgb5gJH-yh_mFOvP zHl?$jT1mjmoSNnkY$mkKuyp4wJD3FQDi}IKR=%wUz6*_@yDM+Muz6uV9Nq7wkk=~PFUYyM?om9-a1RVleltGduv)CIOVozuRxk>*V3!86Sndp}Ar zbS1Q)G`Cr0v`7i2ZjGSbx|+>Kh3M-rMw3mkwkc$aS;)dkh0#n=mwse(XF{7FPlYg% zN?Fw2O=!$@goBX(un~(z7O{VeO7dO5kZI1wa#`OaDB^8?tC^Wn8L+F?z5$Ijdq!!7 zdfhTdY(rDQX`-ZMVM}{TM8ra-d10(b^&&%3-y_SG37sfQ+UiF#T;53Lmok*o6%6Hk z&njunoXu$R)b(`6qBb`MW7AtO)-{Fk)kZR$R!UljH_2p%RBuonBrr>AOj0Kbk~TI< z`s`2IB$AP&j**hu-B0@BnAA=JOHVpm9SfPHG;0z|*pwv`5-IK)ccP6xH0#ASvB*4F zkr9)W6ILbT&E~m_k%cyb*m>4-zPlkN8zd4z$ims+Q0$C@X=duz6bV^xSrFCiCpB>h ztGxmX*KQ4Ho-;;^!GgFBAF%02HA#U-ElW$5(Vot&CG`vE=^Kn>SY0Nm#H0mD+DDo6 zpINdHkDmcg>ZEck*~YLbs(ez`4&RLkDQU|}`ecEhp_BDO z3vALFdm}vmqu2cgc4EaGN`B4)vsBk&P4_v$8O)_n&J=Uc5Sh%h+H7|$WUy&Y={gElp2M!qrk+Cvo34cQ>hfGNBU5nJx)s=DM(2n0nQYT? zt505iBN-#vQd9`qa-oWFzGlyJOz?NKH^rDaWhGG?ZL?7s#ZF^8Bp&ZQ?2{B5Pw`ND zW9{sMcQKvfoMoa~yBJ=8ne$#)a)|Oln*eWM(!$o92qIQec*KL{p*~r|)CP+QwQP2w z7W@J$oQ<7BM&{jYMk-{I9hL)1Fvvg{qVaSjqqZX{*+H+pU7TVCHrYWplG;SyOA(KK zyLLK5COJR+#PVFSQx^GDUdWl1G>>rF!{Qsqm+#gT@!_}67&EMSVVU!6q2S zle(!OrcZcZQbQ(*x~8vZu*ik;>eAp*Qf%fz9sIyud5KIJ-{eR@Z^xQZyRA0jA#c!L zcQV^BPXcC}LQ*w;yjoaSBddhzP1z9O+RzH1DG0SKz*=7AGBgrln#r#ZVfn~sv zvyvY&NgL_uGwCDuam!+^#LC*VGD>AnheRfJY%1ws!nI(gRM4{Kox^^!c@CQ|4M`tR zD}FUdBc(N+d8F3YOjfrPYcrO)MMhl|(&ooP_=OxZwCQj((fmE|kQOKm4b*(JryGi*kj5!U_w5>7Cu0NY? zV9mA5j}QxNm?7*~@~jX)drrhO6U;`as8qODNWM_Zc;R#mK~K^z!9&6cqeA!6bK&Hx zH`>&Rq|ZkFno?h$+40%lnuvBbj@5#8s*#}`??W;u&lQ&A^PG(;^qK0oG(W4C=jo+N zp%Xa;yKG!Lq^WRLG-UiNd&*Duw0qqFmg-mOjwH_O~!HVxR)8O8Uaf9tq3YpgSHd%tu_10E)mv-r@ zK%Q&0pWMyVxb@f$K&&TlKSm2DHY5-FDX-hvns-P$?|OLbs%oi}tgNyR3HeD_`q`JsduY~fxw zTCjLVzJN35$3K=!c9_8G68UrEH0~z3G@ zB;+!h!nDoVq>ZN23o=ogeKJ;eqbXaMI5%TB?ar`Arz&&=Ern4&5R{1(@iKJQ*o5j= zt2V+J0OnJO@KdW%~t-cv#=`r){47JT(W{4{C*Eyo=a!h zl#3Iy2*#wdjXEEWg)!-@l@28sbUqYUW1zOcozB`ec~8^6-Are7wi5qJ(+ssNHl^uo zhxRf&O=ojiU3dwZbasJ`c|A?%tAjjeQ^Y*;Uwkg!NeyIgzQCs!E~#k(0d>nE{5^K(Ha|G^>#pRHNj)h#Al^-3?0T~FGM3+w-IAZ+;7 zVY8`4TIzJiPI^Hoq^C{4iL}x5qDh)rN-#(hCPa6S3uCX=cY9;qvfDeoNcZ`t7im=$ z^E4CHYCt+M{2NDh^;0f%rkEvyaNQf0-B;nR@Ka38yfaGHzFUE1mWi1f;tVGoJ)L2# zvX~?_ett)Y?}`Zj{HcRWKT zV{;BdSPPRkoN4kir2H4abADPQ!}1Ltu(wEUn@UCrWl6(^V-L)>wLO!_uwBf;<=G5> z4$yinmgm@Ps`ZB{^ZWu`Tp zxC!SdGuDd`!g$>8mpa8%F!-7C{9Gms16qCi#@T#drgf3_Oqd!qMrjy0TyxLl+k#9+ zDvOLRR%F8U7Z~k*OQ*qh62UR|)}RF>++7^AuTz4*!Drf@^t&Y3y~ZDU9E>b z1$#YFAZDa6CCq}PHA5Mz?~P zCTeFZvGss6`swG~78Oiu<5*hh>LRfBD?b2o_P~q%*ia^IUu+RCte;#guyB5`pXXrs?_#U(DxG5ThJ459G;>=b*Tt|>Rgijy zi8WhYg!zB^I@jGek|PWAUHnJVin50z8@s?@792?)3(FY^q{fzQj0(Jo>J{0n>1vWq zLf98+_+9rqCnB<{CCWe}ynij8Mj=7FXlWH!E<;qPp$>#DG}-l)Z#m78iNHP z4c!s{(M>bL8bIe^e6yK#?(+Oxi@GyBz*2R1e{q!dw>hIlyJ*B7mBvnU$DJIQG$G)7+*MG2}@ z45Brvw58G4Dx!Rp$LM)+En`9CgGH{39=2OPs*#-{88w&tc|qi5j*UcSJi%B%gKbo% zHaEe;D?X_&%iJu+7Qa)>-?Um&aVZd8UKv;9gc%i?nSb=a6~t;a+ZN3)Vs)EzesQEF zMVOrrhZjehF6I}ZwUYErUt2I&8iQG~%iYWNs`E?f99{Uq$ImY-;)ch_1l6-t#i`5>rwR>nP@eJFJG$ z)apc3pmYw9V<;=KZ+5;_>+4J0FWu_w3^|Khv0C%62FOYIGS~;68>YxQsv(?ha%^fy zQUkXMs%)9FPOu;&pd}(;I{=w(=ctqdH`znRb>XRvA51c$Hj|92q_i$`VE8YCIA-&f zxg0$C2C3z6|5R7WU&GINP0~MAPcNI#q$28AQt#Vk9aqFeJ;Qo1oDHG><|QGDTZpON z@LHs1IQ@VwFvK!f$eShSXhM-vZ*x-VlxarquW}#*(BWM++;B)S|Fpy{`uQ_t{qq^zTco z*${pQVJ_B}4_kkRlTeDHge|oIM>Aa5?@1O@aegOTWGXIkbW|L`!7RK)$a-d{MFb(BkhAo3?u)WwVN zCGBSo=Smc!)g43@2OxRQ$^tS9vy6Noz+{Tr$dT!qKtY)%MkEvV9|crf7p=N5#Bi-4 zD0Jclpt*eNQR^k&&-21crpah{a>qP_LD?ZY$Q=?o+w`a0kulglfI9{vtmz z*0u2=@$qZ^>MyVeGL>nXL5hL<3omMWWU1LwbEaBcma{UbDlboPuXAPk<$1CVPs_U5 zEV6tO?}_k#xJ3yaqpLKq4l=-Lx@ksOvd1bD6@yYUE*;OruCpoQoERIW1n&yVK(eVGsaKq(NB3UKpI`?(t zT*Y0pm@Evu2wSg)0A7C*?Iu8vZE1*48tQT8(jVy^bumZ|ZJp5%JD7-CWuyCQGY;j9 zYCcTho1GDUJ3`Gs(elRk$U*K2Lt4i7LwNfo70CrQ@^e2R^f^99i81;C+wr9*mH`tX z*LgwKGc2WOt%olVBJ8r`iI)&3u7Dep{BuWkdEU37`DmWK`f| z6D(q6>5{UrJ`eF)LyO?9f-LmiFOGBcDzIP;6a#!ii|8Z^3(|dzE*TfVTvjg_n?B~k za)MKuV7q#?ml=mG?S&W%^uz@(=jWQu1gFxY&+^l3zDrgQcv{DxKEY^1V~{e7R2lwZ zta$w0W8w}dBET2LUlxA<*s%jXZz*jReL#<5a^mkF-(QZITKLvIZioZ1Ru5)ia)$37 zHye)4(y-^4lzsm=Eh#2t-#unJxcACbV>$I_t?#fo(xoKbsQtYC_m4j>`R?(T$9-RA ztj;2Y(Bd?g$O{C~CzyC>nX@>}87n09%&soH@cIl9R4U{fLRh6mo@7>wW!U_I^|Nit z1oK)HaHe|pG)Gl>x(cDIXI}A1mxnjf;Vg6!ozq3KR|||{%>N09U0QfJb~=6&t{5fs z7|wn3r$4B1%A6M$8sD&f@K=WqUgQ?1XA-~q1F-0FfymNzDR;tLE+hg4(vBnuX|14v zsdodF>lrW|LWO#-zd&#Vp+j9PnE%6ve}v(Yy+8vbE{nDvWj@OxEvAXuHTqR&Skj{I7!4<00CKT#&{6P%9oL56zvT|=o(8jizLI;ltw zmIF4j{@x0h)=QXXz~#y_!XadbL2!c)9bbW*&cl@+Ug0#Ro`xFx&@~i*k0*TlhvPPP z)289!cyx}K-~ma07#lW(-u=CVn0j}@F#v$hqaR__;x8`v3(^YJ2eiA~P`WDqT$*Z{ z=bAPP7)k3CZlEPr6@+9(FA?#0#ttcntJNrpLxRG=ZV0m*Q#9e~D#Az@l*(Z5kby+~ zSa!uZB8?FFM_DWbVeCAar@>AT(o>ceApsy$4h17jl#`lsp(_T)l9vaW2mlvq7GZ>- z<}M%{w)qVKRv+;qS6|neT4o4~1&_C~kkwr_L)odFtneSTiVF}LI56h2QP}KeDa33x z3Y-0G6fWB-;&_6e9oCt!J>wVxwGm@Y6Ke4RW{swq6fcP&`t^GOmg0m{j+rvrO%q*+ z<1OibCRn3m429hY5jozTTA0ufYFp_AX=FM`qx#Jsc6|TBd2@pK06t={l{%6EZB_C| zBOGM0C=L<19g94zRzR^v9nKf#8I$5wfKn~28H~|4X~giOx;Sb&paDz`(s!Ng;%MxV zX+Sar6|n*FFux3Cb%Ej1BcQys{YHjD0=06PV2lcuH`wfqPE22vr1i6i=E&yPJoH44 z91x-*U85YM=#6~YNSoH!`CD3fcIbY>-ZQ|rI`MCzRZBW}@O65`lzictbWa&Y)!_oQGu|AA#S0JE zKo7b;)dq)~9N`L>`u}e_T`5=64Gku1MHncBZi+h^v5IpnC`3^$&=owYFtDV(DlQE4 z+D~N$&=g8EByd`y_h}~Z$+iQ$+LA`6q3yJ&l?)$|SmSh);Zd_(&pnR`@m9-)W7U|A zQM2;0?a=tt{;>+i21~g9?dzFY)+(Kye6#bP)5EHuHJE>x5qWQ;Nh_*GX_d1*JHf{& zY{jYyWq8aXt$=48_SRpNR6z>h+O1^1s&ff5c~X2V(+iAjHD6vdxpF(>q^vbt-eQ6@ zzLRmV^Xrh5N(@^JonI7jmQkXtzZrAkdLmhm4^Gz;5yr%@_nT%?Cl%u)>4}(sg+(-2 z9`|K(J3^2{>AE4l)#ei@^cY!dqwe#9WkiTto~YX_Em~e$Aii`Yyl{qDo}Qza^N9<^ z%uG7l2~SnS&@>o^@J&$bS)JSqNBS%7h|13Lo`NndM%#v2K8Y}8Ms8=Nnuc__(B_A| znN==)b%Zol#2Ra^XdI+bA!o z4LR7vW9n*N&iuOU!uqPN=4HsyP@|=f&B0kzO;K*&P2vayNzoY^XV$Ng1sx7L^#Rl+&h9;Jq3BW*WJoAOwP& zW$k-c6G`eyh-1p~%THT^9pR14w(Z0XV9=^5xm3)cTZTBZ!F&~vqiZY_giemC zk54kLutAbgi1P4&xw^Wr%##2zSQFZ;SrNnw17{lkJqU4cW1R6sk9VK{(7oB;efDBQ ze%xw*e!lw`DXU;Xl?d$zl`_rvb9|M^PWH{I_3SFY^YpZC6Y(a&DL{x_9x-+sOF`47Jw zbO$dE4qm?cxf9-f{(PV8#^rUWnbE*V>kP-G@1P!O9RBx%H!ptr>e1DdaiUAjr$)2y@s(?5K9@Op3e@0*vmLf^^?*kL#8G(YaYc-_5v{f7J6yqVVEA1_~T zoTe)Fc7OhHqXPE_v1il!R-0dTf4sk+?LF_Fzxd&o&rfoqFoh2M-2UnL*I&#YFX7o= zcJ~inyxF*zcI@Xbsa3ps_4@gXzut2Rtp)W5n`ecml>*mGtZMet>*w8HUQHTKUc>9B z&-Px@`R~27*H3?XvHz84^ZM!QSNmT(jJ5Cn{bzi!zxVvrv-|7zU;g~&Ysc-s`swwX zosHvA9%FR%bb2#x_3cKhdI+yw_w?V?-CuR^%~#4dFQ)y?!B_tN;QqhfkL$YsWLbId z1?<26%9T-Z|Je@WukJk?&;6&bR=oWA&#$`YFZVY;Kbb~!DXOl!fAf!xlXPO>ySq@Z zR-3=>?)}J{ey(qN^NiKvZ-4t6{q?8KZ?ePYar)uD{b`RO_|2~7fIq+FBisDv6=op_ z>n5G!?LYXE{=ECk-dFyWdah{WEL;%!R1a>mITKizdlj7)NWYuYBh_OLF^!FG@W#IU z7;|Y?Wn5c9SF^fT(HVlEBUYBy@Hm&MyQr*?vD8Rp3u!tlFluA-+1CUhs)6)c(R2_; zx^;6ix;|^x-~~$+etlLF6_CQSc*ML$KbYP|f@vclnBGR$c9JIzHUfZ8zyDR*k^#390g;hN@*9M{!v%uo1lXo0=b7iDya&9W5e5!Eiy z^$dQ*O9Xtcf}JmbwQ)*}8oHjNE~?1GWc1(jW8I}i0$~TL=`qBs*L|oDlZr^&C?_Z# zIXTq`B_6%`*2|3`X=>3Wy*d2faFQ=@Q;}Q>nEHAg*8tlL{acsxhWPZhRlWIuO{o}G zfLU$R3f)Cfwu<$T*F`*IB8x6?G4~0zRN5#C4P`wwfp;@IBlw+ z-JDw@?Pd+$pft!x9wVe>S#Nd|e1jW|9^XxWi2bg0bRz^|D3vdInh9*B@0^b%IYDwkzV<#@ZI)zdaADK};u8)`*JkL*K04-ZLKH&^ZgD}M?r6WhbA(hn4A zjfTB0>1_yyAU;b{5xte$UVHc$gb@4|o6nGV+>Wm7K)hJoN>*+L8W0oc#J4!L$3S%3 z(+O3Q^3~he3MmMwm!P#O;hMb;?h0%hAaKi_6r6>ju{9VO-$c?o*%*atpW_?83rn#( zyKUWtU-_K}u{$R7a)G`}a92{^0(aqa-zAN3k}agnosAjp-m}q0I2swo65B9BoV36* zl-VO4S{{sodUQ~CAkzqSm6yqcP*<1cKOsFK%}&9ldYqvPawmST4v2p%9WE_Wn~RXg zMiO^iYl&nhIG=(E!kG*v2-Jo@wq z(OYI7QiG3#?h#}9Y_H5LGCmW=?;3sjTRa5D^LNg>eEH#WzEPn9YJMXe^Mg;@p|06} zS4;luBrI`}rck4fmdPkM6B_B+2{z zHLrKy{N>)7{a=3g`-8ogKYU`z@ky;7ZZv!J`?ueG^Wf9|cTcy!e;Dt3wXv_?EuYqd zPdo9*l;M`|-n(Pm+04Zov53#m-lGhC=ejf8BlIT!<1O7r+qt=sf|RYLvD|v1PB&&Z znxH12WBMSC0c+xyVjeVXJ=w^$6NZE&c0bh_3B7sVPqMfTD`#IYTZL*3F_!ppx(EW= zS?Il0xv0u;SL=4gcwwF{wz@1Iuj4Dt9h`T|%hx!u^dQ_I%)t^1-eZ_{U)B~rY^x=z zx-%+elj}2Y<#u#i|9bcK-9AtB-P`|m`pl^$yYJp=YJB%rGv2$m8baT_)pYjmt=_=9 zx9a}y-fE6{_xAsk{`0ZZ-#euwc*MgK9{SZ>Pky<@L)C5*P>oUCtz*I`fssvwZg#6{ z(XO{5nhy6ma4!6zx2#tbBgxoNJ{()zVk$4U;GlV~Jts*9+a>0&LB%x})CEp<)gu=h z;pw`i74b{0&3Sl1JYcq%zu7=an^-$scVe2#TvGaPNEPobW2X%)_zhT$pyW*aaIZJWd~hK-X$_O; z@oP44K#9cW!=qw2Tsy{q8Z~_x88nY=dt+t2L$Lr|gT$KvgZLf@)31-7z*R~#oqFSA zWz@D`u4Qszh=sff&6{sccD{ARl|(N- zM$gPXF{YXv}OXnIF4^{&$1}nLN+A5cW(Z5fd!pXQypZl_AoCCdJqeRg^xGnj0TU z9+Ny(psf|D%{0N<2^E5@gvZUB1o!Xt!AUou%&mAZfNbtY$66J{HPjxUl<>K_>l?Na zDP0yR)Yh3IO0F2XGzMd`0pJthdtui}W&!OpDU!QO8h$v1kG1qp+1g%G*iB;}NoUWS z>RQ>k;`<%K)5I4;K#0R5g~TM@sH*8`$8iewj$F%JkCB?SCdKR%sZ`L1H` z*C?t@8Aa{0Dv&!V3NnU?Fl3tCxSDrH z9g{J;2nuQ|K~Y7>L_VjNqyZvQhKUB;J#@eHf4W5gG;IO2J_scKYeeS6i22TRGowH1 zU^P&u5YA~gGTQqukhFzDxsjhC(-grY1jQKn0?p5n+|y^r)0-hX%$)&a9jW>Mr#u_Wpq(!2xHiikrR(e$DSVX zd9cUvm7-bUF5)6_DQEiAaX+;#`Qd8c4%LT+ta~J!sMfcX=Dub|mKg};j%7ghCX2Ka zC$5vnjgWpD8Q9Tezf`3~x5^nt%JtSCb!E~I*R^KfjeK5jK&EV1euBK07*somiP-QQ zpsm3~a%V80rdVz2rF7`L0XUHDy_6!)(AuCj>jHT+*%(-~iIploo&~elI71hCXRWN3 zTqPlHD4y)qCbzs&jr))Gw<3eUk?pMjwSAQ!!%J*bWs30>6c^FBOMtspYzIKiH51gy zEnR7L+@9%e&Mmox6RWG-s!8Yr*XMng7#~bILGHCAfU1i>WVW20Pp6~YT8SF(tRxy8 zMo6=$`Dk`Z0%;#4h_^d}#^;^e8IkvfLQp(ilqy1mD4r#`OcPe5Q@l*or)ujTkY*)E zsv5sLm(gKauhyGoFCW?xuc(M_h7xbt1NGKCqUWcr-(PBobV<$%#>vsAfkayq_(JSU}xP5JMqf~psnQ9js0KRu7Ix(wRrQT8ofCM^H z9>zKhiOBnu@p;vLFO9Jf&gg4!)&ea1w=06n>G?+xKXc3gnk#G5D1o(M|34}t*J z#1QXn0QDvYrjwmAloxZSbe+2sD93gKChQep8oL7k5p2RrN&4WR`4B=)>c7QfLA=O_ zh3N;B4!)f(KCcWT&gz=!S*b&f1CZYkD!c)OW0<|4dAQdTrXm;Vf%tC)JRx=T@2$=; zxszz-(_meZxP{yp_L=^`|N4c;J|SdSw7cVqJu#yha!l3GH#Ovyrd>!Otk*KeBjb?O zqS1#PSDGxFH!8)?E(n)jaiT#A`wa1x?9hzxjG)2ayHf5>p_wC%C_msBdWgmhCKz+1 z-4QqHO)VRTn_FC}m~T!onU!)4V@PFT#$-r^OqNJScbZ|40s4L&#u%cwA$;)>hqx$G zUNl}@hoTW98$qc;N`T);y-t}Ov6!TZiZxILQ&$mwRnEVhr|}ZVEFEEcfuUd*K(9n( zULl;OlIWZ<=tC55S9xCmss73TN<3Z4GaRlE95~M;sM*qhI$KV}$aOsUNxma?{#wkh zPbO7DgDTfR8MqS% zas?5um6VvMq<2r1sNW;V&{CG&*v*e~VwL#5HR?|5R0RVfrai_krA*+uDIoWh{I;?m zxdNqYMJN^YQ9N}RPp-quauX&4G9O}@<}+dO&eM*)c0~P6Mchwi)o+RKsYJ_pXoT<- zP;@@iE2U!KZS4_!sE(swUBQ{i#%sR*Qo9Jxqs#A5x{o zr-(u$nlh^KVR}0P=dqUQdDygwaSh<{6AH&%vD4f@dFBJHa}akAvE7U?5^BqHz2pL`BZ>HG0ufUUh94)A-Gm!L4!OD~-Ymz|TysZ=oVrDan88sE6 zOpso%83Imu3($h+j<93WwZSfPqjU?TExeiubTQ6eDl)HVk^(ZVF7-J}bmxX-^Y#fc z#vzU|CdzZGIAWj^-Ui8%+vJ~>$&hJAe46CXEkVL}K_|{AT!9e%XN&k|)IedlL}Jpy zBgcmYqk-0rst>n(G1CE7F|j1HWH9HEW@sz{!eN={yiC?kc@=2*ltdsa5CN>5TJAuu ziLJq!15Gq40Agy#z{t6Uo<>BL0ytn4)V;IUuqjJ5hgS-y87EN0PztQ8qg^azr2r*F zl8S~Uca4v1;97n}BqYid{=)CeIF6CItg`wnrCTZcS)ofbTtkUjl#NdmMBpPgkkm3F z8$oT3DtfGkrLE&cs=LTXhP>u>#qm*^EU-i6keB{cBqVb|8QA34zt*(;q=XlnRsYL$ z^CY{rkIiHBkfwR0s=7gk-hr@QBb}+lad)7>Q!1Vg0)L0o5#@_;v>Xuy%Ms<=75WBb z{!%Hc#K?+Y2sF+H6|+X=v78seIB~k_h=P?19yGymzVzDF7$LprTJ2qbx;+mD{HBmN&Zhg?}bxOFymf$Ruku zq-hM!9#?dw;R*@8;5~$+qjq5j%h%CF8n1F+6bjh}!zv>Wsh3t7WO+U54+yX?-+H35 zRBaT7^dMaGD8z|CDZyezaG!&e51b&nC6U_Uv2dxiT~iWCXS^_rHA{|{CKv=uD;zFw zMpxWe$o%56K!f%jPLzt4^5=)J3BIW7SEN|Q$sp`&R6T1)i&hH!U3-xIE4(V47RZ3 zq+rBzq_P~J=`a~*CRxMit!*T(0)`!%fkWhqt2Y>S;G#1AhK8Z`7N*i{xd)lD1~#8o zRa#H08hr=5vvEH4Vp~m%pgCDHiLpRY8&qnSTxS9}P0c>!t`-dELedymMJ0=A6*N&Z z8CylKZ6&Rop4f_2znI3hU%ZOW2wD#h!bcy*&ni=ZvRj__Xz8rdl8nfv85b3bniaD! zw##Y--)EtmifqQL!cYjO$ub3IF~bH~)iU3>BJ>hC*aq7nt0tZXGBl4ja5!qB_r}t3 zBJ;I@vDz8j6#K$3|kh6 zVh{mJey?m#DY=0ENITO2I$N_g71pF`VFk%rau2M2Y&xpq{zc7mHzGPXzI%4bp0sb5Rpa1{> diff --git a/.devenv/zsh/.zshenv b/.devenv/zsh/.zshenv deleted file mode 100644 index e9b786e..0000000 --- a/.devenv/zsh/.zshenv +++ /dev/null @@ -1,6 +0,0 @@ -# devenv zsh .zshenv - runs before /etc/zshrc. -# Prepend devenv profile site-functions so the system compinit (often -# called from /etc/zshrc on nix-darwin, Debian, etc.) picks them up. -if [ -n "$DEVENV_PROFILE" ] && [ -d "$DEVENV_PROFILE/share/zsh/site-functions" ]; then - fpath=("$DEVENV_PROFILE/share/zsh/site-functions" $fpath) -fi diff --git a/.devenv/zsh/.zshrc b/.devenv/zsh/.zshrc deleted file mode 100644 index 95840b0..0000000 --- a/.devenv/zsh/.zshrc +++ /dev/null @@ -1,200 +0,0 @@ -# devenv zsh init - restore ZDOTDIR and source user's .zshrc - -if [ -n "$_DEVENV_REAL_ZDOTDIR" ]; then - ZDOTDIR="$_DEVENV_REAL_ZDOTDIR" - unset _DEVENV_REAL_ZDOTDIR - [ -f "$ZDOTDIR/.zshenv" ] && source "$ZDOTDIR/.zshenv" - [ -f "$ZDOTDIR/.zshrc" ] && source "$ZDOTDIR/.zshrc" -else - unset ZDOTDIR - [ -f "$HOME/.zshenv" ] && source "$HOME/.zshenv" - [ -f "$HOME/.zshrc" ] && source "$HOME/.zshrc" -fi - -# Restore devenv PATH after user's .zshrc may have modified it -export PATH="$_DEVENV_PATH" - -# Set devenv prompt prefix -PROMPT="(devenv) ${PROMPT}" - -# Hot-reload hook - -autoload -Uz add-zsh-hook - -__devenv_reload_apply() { - # Source new environment if a reload is pending - if [ -f "/tmp/devenv-reload-274471.sh" ]; then - # Shell out to bash to handle the env diff (bash syntax) - local reload_output - reload_output=$(bash -c ' - -# Environment diff helpers (inspired by direnv) -# Diff is stored in _DEVENV_DIFF env var (not a file) so each shell has its own state -# Uses gzip+base64 encoding for compact storage - -# Variables to ignore in diff (shell internals that change dynamically) -__devenv_ignored_var() { - case "$1" in - _*|PWD|OLDPWD|SHLVL|SHELL|SHELLOPTS|BASHOPTS|BASH_*|HISTCMD|HISTFILE) - return 0 ;; - PS1|PS2|PS3|PS4|PROMPT|PROMPT_COMMAND|PROMPT_DIRTRIM) - return 0 ;; - COMP_*|READLINE_*|MAILCHECK|COLUMNS|LINES|RANDOM|SECONDS|LINENO|EPOCHSECONDS|EPOCHREALTIME|SRANDOM) - return 0 ;; - STARSHIP_*|__fish*|DIRENV_*|nix_saved_*) - return 0 ;; - *) - return 1 ;; - esac -} - -__devenv_capture_env() { - # Capture exported variables using declare -p for proper escaping - declare -p -x 2>/dev/null | LC_ALL=C sort -} - -__devenv_serialize_diff() { - # Serialize diff (stdin) to base64-encoded gzip - gzip -c | base64 -w0 -} - -__devenv_deserialize_diff() { - # Deserialize diff from base64-encoded gzip to stdout - echo "$1" | base64 -d | gzip -d 2>/dev/null -} - -__devenv_compute_diff() { - # Compare before ($1) and current env, return diff via _DEVENV_DIFF env var - local before_file="$1" - - # Create temp files - local after_file diff_content - after_file=$(mktemp) - diff_content=$(mktemp) - __devenv_capture_env > "$after_file" - - # Build associative arrays for before/after - local -A before_vars after_vars - while IFS= read -r line; do - [[ "$line" != declare\ -x\ * ]] && continue - local vardef="${line#declare -x }" - local var="${vardef%%=*}" - [[ -z "$var" ]] && continue - __devenv_ignored_var "$var" && continue - before_vars["$var"]="$line" - done < "$before_file" - - while IFS= read -r line; do - [[ "$line" != declare\ -x\ * ]] && continue - local vardef="${line#declare -x }" - local var="${vardef%%=*}" - [[ -z "$var" ]] && continue - __devenv_ignored_var "$var" && continue - after_vars["$var"]="$line" - done < "$after_file" - - # Find PREV entries (vars that were modified or removed) - for var in "${!before_vars[@]}"; do - if [[ "${after_vars[$var]}" != "${before_vars[$var]}" ]]; then - echo "P:${before_vars[$var]}" >> "$diff_content" - fi - done - - # Find NEXT entries (vars that were added or modified) - for var in "${!after_vars[@]}"; do - if [[ -z "${before_vars[$var]+x}" ]]; then - echo "N:$var" >> "$diff_content" - elif [[ "${after_vars[$var]}" != "${before_vars[$var]}" ]]; then - echo "N:$var" >> "$diff_content" - fi - done - - # Serialize and store in env var - _DEVENV_DIFF=$(__devenv_serialize_diff < "$diff_content") - export _DEVENV_DIFF - - rm -f "$after_file" "$diff_content" -} - -__devenv_apply_reverse_diff() { - # Reverse the diff: restore PREV values, unset NEXT-only vars - [[ -z "$_DEVENV_DIFF" ]] && return - - local -A prev_vars - local diff_content - diff_content=$(__devenv_deserialize_diff "$_DEVENV_DIFF") - - # First pass: collect and restore PREV declarations - while IFS= read -r line; do - if [[ "$line" == P:declare\ * ]]; then - local decl="${line#P:}" - local var="${decl#declare -x }" - var="${var%%=*}" - prev_vars["$var"]=1 - # Use export instead of evaluating the declare statement directly, - # because declare -x inside a function creates a local variable - # in bash 5.0+. - eval "export ${decl#declare -x }" 2>/dev/null - fi - done <<< "$diff_content" - - # Second pass: unset NEXT vars that were not in PREV (added vars) - while IFS= read -r line; do - if [[ "$line" == N:* ]]; then - local var="${line#N:}" - if [[ -z "${prev_vars[$var]+x}" ]]; then - unset "$var" - fi - fi - done <<< "$diff_content" -} - - -# Reverse previous diff -__devenv_apply_reverse_diff - -# Capture env before sourcing new devenv -_before=$(mktemp) -__devenv_capture_env > "$_before" - -# Source new devenv environment -source "/tmp/devenv-reload-274471.sh" -rm -f "/tmp/devenv-reload-274471.sh" - -# Compute new diff -__devenv_compute_diff "$_before" -rm -f "$_before" - -# Output current environment for the calling shell to parse -export -p - ' 2>/dev/null) - - # Apply the environment changes - if [ -n "$reload_output" ]; then - eval "$reload_output" - fi - - # Update saved PATH - _DEVENV_PATH="$PATH" - fi -} - -__devenv_restore_path() { - # Restore devenv PATH (in case direnv or other tools modified it) - export PATH="$_DEVENV_PATH" -} - -__devenv_precmd_hook() { - __devenv_reload_apply - __devenv_restore_path -} -add-zsh-hook precmd __devenv_precmd_hook - -# Keybinding for manual reload -__devenv_reload_widget() { - __devenv_reload_apply - zle reset-prompt -} -zle -N __devenv_reload_widget -bindkey "${DEVENV_RELOAD_KEYBIND:-\\e\\C-r}" __devenv_reload_widget - diff --git a/.gitignore b/.gitignore index 02de56d..da201be 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ vite.config.ts.timestamp-* .session local.db /.devenv +/.devenv