# Nix shell entry point # # SPDX-FileCopyrightText: 2023 Nguyễn Gia Phong # SPDX-License-Identifier: AGPL-3.0-or-later with import { }; let binRenameHook = version: writeTextFile { name = "bin-rename-hook"; text = '' #!${runtimeShell} renameBinaries() { for i in $out/bin/* do mv $i{,.${version}} done } preDistPhases+=(renameBinaries) ''; executable = true; destination = "/nix-support/setup-hook"; }; cppcheck = version: commit: hash: callPackage ./cppcheck.nix { inherit version; inherit commit; inherit hash; binRenameHook = binRenameHook version; }; grep-2_6 = fetchurl { url = "mirror://gnu/grep/grep-2.6.tar.xz"; hash = "sha256-YsNien9DBt1gBAED27fZ8SIOSlTFV9ndDEwy9t1itRE="; }; grep-2_12 = fetchurl { url = "mirror://gnu/grep/grep-2.12.tar.xz"; hash = "sha256-Tc4KT7g93QEg31HgC1L6dg8u2GddTUwLCuZCumkurWQ="; }; grep = version: base: commit: hash: callPackage ./grep.nix { inherit version; inherit base; snapshot = fetchurl { url = "http://git.savannah.gnu.org/cgit/grep.git/snapshot/grep-${commit}.tar.gz"; inherit hash; }; binRenameHook = binRenameHook version; }; in mkShell { packages = [ (cppcheck "9261.buggy" "4943771e41f76edc64b273c6b257ecc0ba778a20" "sha256-mcE9Nq/OfNiLgz3PuZEUplFRMc7E2D7ALuFdNFT6iQI=") (cppcheck "9261.fixed" "00fae7fb428b0b055135d6b972a1b52dd2c08d03" "sha256-jJY06u07fzd9AOd1pr7xM7Qdm6oDW1ehGEqKlxxHT6s=") (grep "8f08d8e2.parent" grep-2_6 "c1cb19fe67f4c83f9232087ae03c178905d62b0d" "sha256-tT3H9pehJ8X6XPf6qyhUvjKspQZXvCd2I4uQQuabOn8=") (grep "8f08d8e2" grep-2_6 "8f08d8e282bf3d4917e94135e67ba17d738313ce" "sha256-xQO/d/nTk/q/7Sq6m+exZX7jwYzqbhcKirw9tqC7+zI=") (grep "55cf7b6a.parent" grep-2_12 "a2e0193455e620f6bad1005500da418d9eba2ae6" "sha256-Q1Xye4qHdWOlZSJ+S+T9Cy/71OLN+WE97Va84BFoV/Q=") (grep "55cf7b6a" grep-2_12 "55cf7b6a1905320c36702a476b09ebb29a2934d3" "sha256-uUHEG4bDDNFiVgj/1mIkttp1B7tlZ1HOWJGPEfbCErU=") ]; }