From 7612c204e1889e1a385bdcf0d19c923f17dadbd4 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Thu, 21 Oct 2021 22:36:04 -0700 Subject: [PATCH] Throw out all but the blog-related code --- blog/builder.sh => builder.sh | 0 blog/change_blog_nix.sh => change_blog_nix.sh | 0 blog/convert.rb => convert.rb | 0 custom-crystal/default.nix | 25 ------------------ blog/default.nix => default.nix | 0 joann-pupper-bot/default.nix | 16 ------------ joann-pupper-bot/git-shards.nix | 7 ----- joann-pupper-bot/shards.nix | 26 ------------------- blog/katexserver.js => katexserver.js | 0 blog/node-env.nix => node-env.nix | 0 blog/node-packages.nix => node-packages.nix | 0 overlay.nix | 7 ----- blog/packages.json => packages.json | 0 pegasus/default.nix | 24 ----------------- ...ired-packages.nix => required-packages.nix | 0 blog/update_blog.sh => update_blog.sh | 0 16 files changed, 105 deletions(-) rename blog/builder.sh => builder.sh (100%) rename blog/change_blog_nix.sh => change_blog_nix.sh (100%) rename blog/convert.rb => convert.rb (100%) delete mode 100644 custom-crystal/default.nix rename blog/default.nix => default.nix (100%) delete mode 100644 joann-pupper-bot/default.nix delete mode 100644 joann-pupper-bot/git-shards.nix delete mode 100644 joann-pupper-bot/shards.nix rename blog/katexserver.js => katexserver.js (100%) rename blog/node-env.nix => node-env.nix (100%) rename blog/node-packages.nix => node-packages.nix (100%) delete mode 100644 overlay.nix rename blog/packages.json => packages.json (100%) delete mode 100644 pegasus/default.nix rename blog/required-packages.nix => required-packages.nix (100%) rename blog/update_blog.sh => update_blog.sh (100%) diff --git a/blog/builder.sh b/builder.sh similarity index 100% rename from blog/builder.sh rename to builder.sh diff --git a/blog/change_blog_nix.sh b/change_blog_nix.sh similarity index 100% rename from blog/change_blog_nix.sh rename to change_blog_nix.sh diff --git a/blog/convert.rb b/convert.rb similarity index 100% rename from blog/convert.rb rename to convert.rb diff --git a/custom-crystal/default.nix b/custom-crystal/default.nix deleted file mode 100644 index e7bd270..0000000 --- a/custom-crystal/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ stdenv, lib, linkFarm, fetchgit, fetchFromGitHub }: - -{ crystal, - gitShardsFile ? null, - lockFile ? null, - shardsFile ? null, ...}@args: - -let - buildArgs = builtins.removeAttrs args [ "crystal" ]; - githubLinks = lib.mapAttrsToList (name: value: { - inherit name; - path = fetchFromGitHub value; - }) (import shardsFile); - gitLinks = lib.mapAttrsToList (name: value: { - inherit name; - path = fetchgit { inherit (value) url rev sha256; }; - }) (import gitShardsFile); - crystalLib = linkFarm "crystal-lib" (githubLinks ++ gitLinks); - configurePhase = args.configurePhase or lib.concatStringsSep "\n" ([ - "runHook preConfigure" - ] ++ lib.optional (lockFile != null) "ln -s ${lockFile} ./shard.lock" - ++ lib.optional (shardsFile != null) "ln -s ${crystalLib} lib" - ++ [ "runHook postConfigure "]); -in - crystal.buildCrystalPackage (buildArgs // { inherit configurePhase; }) diff --git a/blog/default.nix b/default.nix similarity index 100% rename from blog/default.nix rename to default.nix diff --git a/joann-pupper-bot/default.nix b/joann-pupper-bot/default.nix deleted file mode 100644 index b885260..0000000 --- a/joann-pupper-bot/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ stdenv, fetchgit, crystal, customCrystal, sqlite, openssl, pkg-config }: -let - url = "https://dev.danilafe.com/Crystal-Bots/joann-pupper-bot"; - rev = "8d90b052a001a6101dc691a907a16de4fb0a26ee"; - sha256 = "0r2xyfqj9v73y9il90f2mp2x5h79nbv4yhfsh79kn1w0li6nlx3s"; -in - customCrystal { - inherit crystal; - pname = "joann-pupper-bot"; - version = rev; - src = fetchgit { inherit url rev sha256; }; - shardsFile = ./shards.nix; - gitShardsFile = ./git-shards.nix; - crystalBinaries.joann-pupper-bot.src = "src/joann-pupper-bot.cr"; - buildInputs = [ sqlite openssl pkg-config ]; - } diff --git a/joann-pupper-bot/git-shards.nix b/joann-pupper-bot/git-shards.nix deleted file mode 100644 index 2fd13db..0000000 --- a/joann-pupper-bot/git-shards.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - telepathy = { - url = "https://dev.danilafe.com/Crystal-Bots/telepathy"; - rev = "v0.1.2"; - sha256 = "1vis5ncfdjapxqm2q39bd0iwqrkim2wbn84xi3fydshhpkznqh88"; - }; -} diff --git a/joann-pupper-bot/shards.nix b/joann-pupper-bot/shards.nix deleted file mode 100644 index 69f07cf..0000000 --- a/joann-pupper-bot/shards.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - cron_parser = { - owner = "kostya"; - repo = "cron_parser"; - rev = "v0.3.0"; - sha256 = "0ss5zhlvq8kcmc8j2msigpayrx0nys44j66d6smdnql06bncrm13"; - }; - cron_scheduler = { - owner = "kostya"; - repo = "cron_scheduler"; - rev = "v0.3.0"; - sha256 = "15lk8x7p5nq388ll7g5al9mflr1723kj6akrj9fadqf9535i6rqc"; - }; - db = { - owner = "crystal-lang"; - repo = "crystal-db"; - rev = "v0.9.0"; - sha256 = "0am5njx9g0m7lqmzs4qpgrnqq2pl9yb9h6jfrwgarx15c4jdrrzd"; - }; - sqlite3 = { - owner = "crystal-lang"; - repo = "crystal-sqlite3"; - rev = "v0.16.0"; - sha256 = "1kqbp642gskffwpa98l08s3chx0d49wngjsh0ax7pbjn9kgf7sq5"; - }; -} diff --git a/blog/katexserver.js b/katexserver.js similarity index 100% rename from blog/katexserver.js rename to katexserver.js diff --git a/blog/node-env.nix b/node-env.nix similarity index 100% rename from blog/node-env.nix rename to node-env.nix diff --git a/blog/node-packages.nix b/node-packages.nix similarity index 100% rename from blog/node-packages.nix rename to node-packages.nix diff --git a/overlay.nix b/overlay.nix deleted file mode 100644 index d155f98..0000000 --- a/overlay.nix +++ /dev/null @@ -1,7 +0,0 @@ -self: super: - -{ - pegasus = super.callPackage ./pegasus/default.nix { crystal = super.crystal_0_31; }; - blog = super.callPackage ./blog/default.nix {}; - customCrystal = super.callPackage ./custom-crystal/default.nix {}; -} diff --git a/blog/packages.json b/packages.json similarity index 100% rename from blog/packages.json rename to packages.json diff --git a/pegasus/default.nix b/pegasus/default.nix deleted file mode 100644 index d51264e..0000000 --- a/pegasus/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv, crystal, fetchFromGitHub }: - -let - version = "0489d47b191ecf8501787355b948801506e7c70f"; - src = fetchFromGitHub { - owner = "DanilaFe"; - repo = "pegasus"; - rev = version; - sha256 = "097m7l16byis07xlg97wn5hdsz9k6c3h1ybzd2i7xhkj24kx230s"; - }; -in - crystal.buildCrystalPackage { - pname = "pegasus"; - inherit version; - inherit src; - - crystalBinaries.pegasus.src = "src/pegasus.cr"; - crystalBinaries.pegasus-dot.src = "src/tools/dot/pegasus_dot.cr"; - crystalBinaries.pegasus-sim.src = "src/tools/sim/pegasus_sim.cr"; - crystalBinaries.pegasus-c.src = "src/generators/c/pegasus_c.cr"; - crystalBinaries.pegasus-csem.src = "src/generators/csem/pegasus_csem.cr"; - crystalBinaries.pegasus-crystal.src = "src/generators/crystal/pegasus_crystal.cr"; - crystalBinaries.pegasus-crystalsem.src = "src/generators/crystalsem/pegasus_crystalsem.cr"; - } diff --git a/blog/required-packages.nix b/required-packages.nix similarity index 100% rename from blog/required-packages.nix rename to required-packages.nix diff --git a/blog/update_blog.sh b/update_blog.sh similarity index 100% rename from blog/update_blog.sh rename to update_blog.sh