diff options
author | EuAndreh <eu@euandre.org> | 2021-06-24 11:15:27 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-24 11:15:27 -0300 |
commit | 97a3cfcad27061084dc917bf5a42089d9a89e71f (patch) | |
tree | 7a2057421e511aaa786eac35ac1b8a5835aa9ada | |
parent | aux/workflow/TODOs.sh: Use <pre> over <span> for ids (diff) | |
download | euandre.org-97a3cfcad27061084dc917bf5a42089d9a89e71f.tar.gz euandre.org-97a3cfcad27061084dc917bf5a42089d9a89e71f.tar.xz |
nix/: Remove
-rw-r--r-- | nix/gemset.nix | 300 | ||||
-rw-r--r-- | nix/nixpkgs-next.nix | 36 | ||||
-rw-r--r-- | nix/sources.json | 26 | ||||
-rw-r--r-- | nix/sources.nix | 197 | ||||
-rw-r--r-- | nix/utils-i18n.nix | 57 |
5 files changed, 0 insertions, 616 deletions
diff --git a/nix/gemset.nix b/nix/gemset.nix deleted file mode 100644 index b13c463..0000000 --- a/nix/gemset.nix +++ /dev/null @@ -1,300 +0,0 @@ -{ - addressable = { - dependencies = [ "public_suffix" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"; - type = "gem"; - }; - version = "2.7.0"; - }; - colorator = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"; - type = "gem"; - }; - version = "1.1.0"; - }; - concurrent-ruby = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1vnxrbhi7cq3p4y2v9iwd10v1c7l15is4var14hwnb2jip4fyjzz"; - type = "gem"; - }; - version = "1.1.7"; - }; - em-websocket = { - dependencies = [ "eventmachine" "http_parser.rb" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"; - type = "gem"; - }; - version = "0.5.1"; - }; - eventmachine = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"; - type = "gem"; - }; - version = "1.2.7"; - }; - ffi = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "12lpwaw82bb0rm9f52v1498bpba8aj2l2q359mkwbxsswhpga5af"; - type = "gem"; - }; - version = "1.13.1"; - }; - forwardable-extended = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"; - type = "gem"; - }; - version = "2.6.0"; - }; - "http_parser.rb" = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"; - type = "gem"; - }; - version = "0.6.0"; - }; - i18n = { - dependencies = [ "concurrent-ruby" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "153sx77p16vawrs4qpkv7qlzf9v5fks4g7xqcj1dwk40i6g7rfzk"; - type = "gem"; - }; - version = "1.8.5"; - }; - jekyll = { - dependencies = [ - "addressable" - "colorator" - "em-websocket" - "i18n" - "jekyll-sass-converter" - "jekyll-watch" - "kramdown" - "kramdown-parser-gfm" - "liquid" - "mercenary" - "pathutil" - "rouge" - "safe_yaml" - "terminal-table" - ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "192k1ggw99slpqpxb4xamcvcm2pdahgnmygl746hmkrar0i3xa5r"; - type = "gem"; - }; - version = "4.1.1"; - }; - jekyll-sass-converter = { - dependencies = [ "sassc" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "04ncr44wrilz26ayqwlg7379yjnkb29mvx4j04i62b7czmdrc9dv"; - type = "gem"; - }; - version = "2.1.0"; - }; - jekyll-watch = { - dependencies = [ "listen" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1qd7hy1kl87fl7l0frw5qbn22x7ayfzlv9a5ca1m59g0ym1ysi5w"; - type = "gem"; - }; - version = "2.2.1"; - }; - kramdown = { - dependencies = [ "rexml" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1vmw752c26ny2jwl0npn0gbyqwgz4hdmlpxnsld9qi9xhk5b1qh7"; - type = "gem"; - }; - version = "2.3.0"; - }; - kramdown-parser-gfm = { - dependencies = [ "kramdown" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"; - type = "gem"; - }; - version = "1.1.0"; - }; - liquid = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "0zhg5ha8zy8zw9qr3fl4wgk4r5940n4128xm2pn4shpbzdbsj5by"; - type = "gem"; - }; - version = "4.0.3"; - }; - listen = { - dependencies = [ "rb-fsevent" "rb-inotify" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1w923wmdi3gyiky0asqdw5dnh3gcjs2xyn82ajvjfjwh6sn0clgi"; - type = "gem"; - }; - version = "3.2.1"; - }; - mercenary = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "0f2i827w4lmsizrxixsrv2ssa3gk1b7lmqh8brk8ijmdb551wnmj"; - type = "gem"; - }; - version = "0.4.0"; - }; - pathutil = { - dependencies = [ "forwardable-extended" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"; - type = "gem"; - }; - version = "0.16.2"; - }; - public_suffix = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"; - type = "gem"; - }; - version = "4.0.5"; - }; - rb-fsevent = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1k9bsj7ni0g2fd7scyyy1sk9dy2pg9akniahab0iznvjmhn54h87"; - type = "gem"; - }; - version = "0.10.4"; - }; - rb-inotify = { - dependencies = [ "ffi" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1jm76h8f8hji38z3ggf4bzi8vps6p7sagxn3ab57qc0xyga64005"; - type = "gem"; - }; - version = "0.10.1"; - }; - rexml = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1mkvkcw9fhpaizrhca0pdgjcrbns48rlz4g6lavl5gjjq3rk2sq3"; - type = "gem"; - }; - version = "3.2.4"; - }; - rouge = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1wcz7i009wdbymlfsamagqi18m6ih8j60bii0k18f21g70r72i0m"; - type = "gem"; - }; - version = "3.22.0"; - }; - safe_yaml = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "0j7qv63p0vqcd838i2iy2f76c3dgwzkiz1d1xkg7n0pbnxj2vb56"; - type = "gem"; - }; - version = "1.0.5"; - }; - sassc = { - dependencies = [ "ffi" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "0gpqv48xhl8mb8qqhcifcp0pixn206a7imc07g48armklfqa4q2c"; - type = "gem"; - }; - version = "2.4.0"; - }; - terminal-table = { - dependencies = [ "unicode-display_width" ]; - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "1512cngw35hsmhvw4c05rscihc59mnj09m249sm9p3pik831ydqk"; - type = "gem"; - }; - version = "1.8.0"; - }; - unicode-display_width = { - groups = [ "default" ]; - platforms = [ ]; - source = { - remotes = [ "https://rubygems.org" ]; - sha256 = "06i3id27s60141x6fdnjn5rar1cywdwy64ilc59cz937303q3mna"; - type = "gem"; - }; - version = "1.7.0"; - }; -} diff --git a/nix/nixpkgs-next.nix b/nix/nixpkgs-next.nix deleted file mode 100644 index cb72934..0000000 --- a/nix/nixpkgs-next.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ pkgs }: rec { - md4c = pkgs.stdenv.mkDerivation rec { - pname = "md4c"; - version = "release-0.4.6"; - src = pkgs.fetchFromGitHub { - owner = "mity"; - repo = "md4c"; - rev = version; - sha256 = "0km84rmcrczq4n87ryf3ffkfbjh4jim361pbld0z8wgp60rz08dh"; - }; - nativeBuildInputs = with pkgs; [ cmake ]; - }; - - pymd4c = with pkgs.python3.pkgs; - buildPythonPackage rec { - pname = "pymd4c"; - version = "0.4.6.0b1"; - src = fetchPypi { - inherit pname version; - sha256 = "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"; - }; - nativeBuildInputs = [ pkgs.pkgconfig ]; - propagatedBuildInputs = [ md4c pkgs.python3Packages.pkgconfig ]; - }; - - mdpo = with pkgs.python3.pkgs; - buildPythonPackage rec { - pname = "mdpo"; - version = "0.2.37"; - src = fetchPypi { - inherit pname version; - sha256 = "09pw38vms6l50sq0n81a4d3gr395rz759rk8f108bfqydi0lyrcr"; - }; - propagatedBuildInputs = with pkgs.python3Packages; [ polib pymd4c ]; - }; -} diff --git a/nix/sources.json b/nix/sources.json deleted file mode 100644 index 388d26d..0000000 --- a/nix/sources.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "niv": { - "branch": "master", - "description": "Easy dependency management for Nix projects", - "homepage": "https://github.com/nmattia/niv", - "owner": "nmattia", - "repo": "niv", - "rev": "3cd7914b2c4cff48927e11c216dadfab7d903fe5", - "sha256": "1agq4nvbhrylf2s77kb4xhh9k7xcwdwggq764k4jgsbs70py8cw3", - "type": "tarball", - "url": "https://github.com/nmattia/niv/archive/3cd7914b2c4cff48927e11c216dadfab7d903fe5.tar.gz", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" - }, - "nixpkgs": { - "branch": "nixos-unstable", - "description": "Nix Packages collection", - "homepage": "", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "68398d2dd50efc2d878bf0f83bbc8bc323b6b0e0", - "sha256": "1bivcxnajll53ixwyl304fq22w5dg97fqbwk8imp6ipwq84bq5ga", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/68398d2dd50efc2d878bf0f83bbc8bc323b6b0e0.tar.gz", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" - } -} diff --git a/nix/sources.nix b/nix/sources.nix deleted file mode 100644 index 9f418ad..0000000 --- a/nix/sources.nix +++ /dev/null @@ -1,197 +0,0 @@ -# This file has been generated by Niv. - -let - - # - # The fetchers. fetch_<type> fetches specs of type <type>. - # - - fetch_file = pkgs: name: spec: - let name' = sanitizeName name + "-src"; - in if spec.builtin or true then - builtins_fetchurl { - inherit (spec) url sha256; - name = name'; - } - else - pkgs.fetchurl { - inherit (spec) url sha256; - name = name'; - }; - - fetch_tarball = pkgs: name: spec: - let name' = sanitizeName name + "-src"; - in if spec.builtin or true then - builtins_fetchTarball { - name = name'; - inherit (spec) url sha256; - } - else - pkgs.fetchzip { - name = name'; - inherit (spec) url sha256; - }; - - fetch_git = name: spec: - let - ref = if spec ? ref then - spec.ref - else if spec ? branch then - "refs/heads/${spec.branch}" - else if spec ? tag then - "refs/tags/${spec.tag}" - else - abort - "In git source '${name}': Please specify `ref`, `tag` or `branch`!"; - in builtins.fetchGit { - url = spec.repo; - inherit (spec) rev; - inherit ref; - }; - - fetch_local = spec: spec.path; - - fetch_builtin-tarball = name: - throw '' - [${name}] The niv type "builtin-tarball" is deprecated. You should instead use `builtin = true`. - $ niv modify ${name} -a type=tarball -a builtin=true''; - - fetch_builtin-url = name: - throw '' - [${name}] The niv type "builtin-url" will soon be deprecated. You should instead use `builtin = true`. - $ niv modify ${name} -a type=file -a builtin=true''; - - # - # Various helpers - # - - # https://github.com/NixOS/nixpkgs/pull/83241/files#diff-c6f540a4f3bfa4b0e8b6bafd4cd54e8bR695 - sanitizeName = name: - (concatMapStrings (s: if builtins.isList s then "-" else s) - (builtins.split "[^[:alnum:]+._?=-]+" - ((x: builtins.elemAt (builtins.match "\\.*(.*)" x) 0) name))); - - # The set of packages used when specs are fetched using non-builtins. - mkPkgs = sources: system: - let - sourcesNixpkgs = import - (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) { - inherit system; - }; - hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath; - hasThisAsNixpkgsPath = <nixpkgs> == ./.; - in if builtins.hasAttr "nixpkgs" sources then - sourcesNixpkgs - else if hasNixpkgsPath && !hasThisAsNixpkgsPath then - import <nixpkgs> { } - else - abort '' - Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or - add a package called "nixpkgs" to your sources.json. - ''; - - # The actual fetching function. - fetch = pkgs: name: spec: - - if !builtins.hasAttr "type" spec then - abort "ERROR: niv spec ${name} does not have a 'type' attribute" - else if spec.type == "file" then - fetch_file pkgs name spec - else if spec.type == "tarball" then - fetch_tarball pkgs name spec - else if spec.type == "git" then - fetch_git name spec - else if spec.type == "local" then - fetch_local spec - else if spec.type == "builtin-tarball" then - fetch_builtin-tarball name - else if spec.type == "builtin-url" then - fetch_builtin-url name - else - abort - "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}"; - - # If the environment variable NIV_OVERRIDE_${name} is set, then use - # the path directly as opposed to the fetched source. - replace = name: drv: - let - saneName = stringAsChars - (c: if isNull (builtins.match "[a-zA-Z0-9]" c) then "_" else c) name; - ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}"; - in if ersatz == "" then drv else ersatz; - - # Ports of functions for older nix versions - - # a Nix version of mapAttrs if the built-in doesn't exist - mapAttrs = builtins.mapAttrs or (f: set: - with builtins; - listToAttrs (map (attr: { - name = attr; - value = f attr set.${attr}; - }) (attrNames set))); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 - range = first: last: - if first > last then - [ ] - else - builtins.genList (n: first + n) (last - first + 1); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 - stringToCharacters = s: - map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 - stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); - concatMapStrings = f: list: concatStrings (map f list); - concatStrings = builtins.concatStringsSep ""; - - # https://github.com/NixOS/nixpkgs/blob/8a9f58a375c401b96da862d969f66429def1d118/lib/attrsets.nix#L331 - optionalAttrs = cond: as: if cond then as else { }; - - # fetchTarball version that is compatible between all the versions of Nix - builtins_fetchTarball = { url, name ? null, sha256 }@attrs: - let inherit (builtins) lessThan nixVersion fetchTarball; - in if lessThan nixVersion "1.12" then - fetchTarball - ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; })) - else - fetchTarball attrs; - - # fetchurl version that is compatible between all the versions of Nix - builtins_fetchurl = { url, name ? null, sha256 }@attrs: - let inherit (builtins) lessThan nixVersion fetchurl; - in if lessThan nixVersion "1.12" then - fetchurl - ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; })) - else - fetchurl attrs; - - # Create the final "sources" from the config - mkSources = config: - mapAttrs (name: spec: - if builtins.hasAttr "outPath" spec then - abort - "The values in sources.json should not have an 'outPath' attribute" - else - spec // { outPath = replace name (fetch config.pkgs name spec); }) - config.sources; - - # The "config" used by the fetchers - mkConfig = { sourcesFile ? - if builtins.pathExists ./sources.json then ./sources.json else null - , sources ? if isNull sourcesFile then - { } - else - builtins.fromJSON (builtins.readFile sourcesFile) - , system ? builtins.currentSystem, pkgs ? mkPkgs sources system }: rec { - # The sources, i.e. the attribute set of spec name to spec - inherit sources; - - # The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers - inherit pkgs; - }; - -in mkSources (mkConfig { }) // { - __functor = _: settings: mkSources (mkConfig settings); -} diff --git a/nix/utils-i18n.nix b/nix/utils-i18n.nix deleted file mode 100644 index 95ae312..0000000 --- a/nix/utils-i18n.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ pkgs }: rec { - sphinx-intl = with pkgs.python3.pkgs; - buildPythonPackage rec { - pname = "sphinx-intl"; - version = "2.0.1"; - src = fetchPypi { - inherit pname version; - sha256 = "1d1q0sanjp4nkfvhsxi75zf3xjyyi8nzxvl3v7l0jy9ld70nwnmj"; - }; - propagatedBuildInputs = with pkgs.python3Packages; [ Babel click sphinx ]; - }; - dicts = rec { - mkDict = let - prefix = - "https://raw.githubusercontent.com/wooorm/dictionaries/61016e00e276f9bf5e52cbc6c02a45f2e49b2c7e/dictionaries"; - in { lang, dicSHA256, affSHA256 }: - let - dic = builtins.fetchurl { - url = "${prefix}/${lang}/index.dic"; - sha256 = dicSHA256; - }; - aff = builtins.fetchurl { - url = "${prefix}/${lang}/index.aff"; - sha256 = affSHA256; - }; - in pkgs.stdenv.mkDerivation { - name = "website-dict-${lang}"; - builder = builtins.toFile "builder.sh" '' - source $stdenv/setup - install -dm755 $out/share/hunspell - install -m644 ${dic} $out/share/hunspell/${lang}.dic - install -m644 ${aff} $out/share/hunspell/${lang}.aff - runHook postInstall - ''; - }; - en = mkDict { - lang = "en"; - dicSHA256 = "1k4660ccwwpwac0rc7b8ih3vd24kxgvljkrakv2l1f72yfpw3bp2"; - affSHA256 = "0yvc2fhc03y0y1gwjyb20ifcrxnzm3ama1fri9r5gna092fz3qca"; - }; - pt = mkDict { - lang = "pt"; - dicSHA256 = "1z0kfxv8m361xhp4zwdlsn2ib8q3rnljj0b2s4482alyxpd00h9x"; - affSHA256 = "1ssj1g7qwh0lv3ajzvchwsfr7cgzrlqms28m1j3gm1y2avi50qhw"; - }; - fr = mkDict { - lang = "fr"; - dicSHA256 = "10p6jlk9j117mjd1z3dp3vfszcvxqha11kfvksqhvrq4ld9xwzbn"; - affSHA256 = "0d6k608h7gm1za3vdq1fhlwqzz2zxg1z0bx1bfvi0spg4a2mn09p"; - }; - eo = mkDict { - lang = "eo"; - dicSHA256 = "1hbs8f67kq953llcx8pm0rwi2ln2y693pva952fb9mjc4l99ic3m"; - affSHA256 = "198jaiab98xks5srizi3ww7sg5biqhjl7acjhrsrmcycp8jvns56"; - }; - }; -} |