This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| see the revision history for lock files, if required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { lib ? import <nixpkgs/lib>, pkgs ? import <nixpkgs> { config.checkMeta = true; }, config ? pkgs.config }: let | |
| extendedMetaAttrs = [ "agsRoles" ]; | |
| removeExtendedFromMeta = attrs: attrs // (lib.optionalAttrs (attrs ? meta) { | |
| meta = builtins.removeAttrs attrs.meta extendedMetaAttrs; | |
| }); | |
| getExtendedMeta = attrs: lib.filterAttrs | |
| (n: _: builtins.elem n extendedMetaAttrs) | |
| (attrs.meta or {}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { pkgs ? import ./. {} }: let | |
| overlay = f: p: let base = p.llvmPackages_15; in { | |
| llvmPackages_15 = let | |
| patch = f.fetchpatch { | |
| url = "https://github.com/llvm/llvm-project/commit/57c7bb3ec89565c68f858d316504668f9d214d59.patch"; | |
| hash = "sha256-AaM9A6tQ4YAw7uDqCIV4VaiUyLZv+unwcOqbakwW9/k="; | |
| relative = "libcxx"; | |
| }; | |
| tools = base.tools; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // We want to slice and dice our opcode map on: | |
| // - opcode byte | |
| // - opcode map (aka leading opcode bytes; if present) | |
| // - prefixes | |
| // | |
| // Unfortunately, C doesn't have pattern matching. The macros that follow are | |
| // our (unfortunate) facsimile. | |
| // | |
| // Essentially we are — in the style of `disas_insn` — appropriating the upper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env nix-shell | |
| #! nix-shell -i bash -p bash coreutils procps cpuset which | |
| # shellcheck shell=bash | |
| # Based on suggestions from here: https://llvm.org/docs/Benchmarking.html. | |
| # Also see: https://juliaci.github.io/BenchmarkTools.jl/dev/linuxtips/. | |
| # And: https://man7.org/linux/man-pages/man7/cpuset.7.html. | |
| set -euo pipefail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| inputs = { | |
| nixpkgs-working.url = github:NixOS/nixpkgs/2ebb6c1e5ae402ba35cca5eec58385e5f1adea04; | |
| nixpkgs-broken.url = github:NixOS/nixpkgs/nixos-unstable; # d917136f550a8c36efb1724390c7245105f79023 as of this writing | |
| nixpkgs-test.url = github:NixOS/nixpkgs/2fe19fe24a225c33c4011ee9dbc0b4310b798134; | |
| }; | |
| outputs = { self, nixpkgs-working, nixpkgs-broken, nixpkgs-test }: let | |
| old = nixpkgs-working.legacyPackages.x86_64-linux; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { lib | |
| , phases ? [ | |
| "Patch" | |
| "Unpack" | |
| "Configure" | |
| "Build" | |
| "Install" | |
| "Check" | |
| "InstallCheck" | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //! Implementation of the [Playfair cipher]. | |
| //! | |
| //! [Playfair cipher]: https://en.wikipedia.org/wiki/Playfair_cipher | |
| #![cfg_attr(feature = "no_std", no_std)] | |
| #![cfg_attr(all(docs, not(doctest)), feature(doc_auto_cfg))] | |
| use core::fmt::{self, Display}; | |
| // Normally we'd use a `std` feature instead of a `no_std` feature (this works |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { nixpkgs ? ./. | |
| , lib ? import ./lib | |
| # Host systems to test from. | |
| , systems ? [ | |
| "i686-linux" | |
| "x86_64-linux" | |
| # "x86_64-darwin" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Look at `lib/customization.nix`, specifically `makeOverridable`. | |
| # | |
| # ``` | |
| # func(args) -> Res | |
| # | |
| # override: | |
| # func( override(args) ) -> Res | |
| # where override :: Args -> Args | |
| # + to reinsert the overrides: `makeOverridable func override(args)` | |
| # |