Commit Diff


commit - 4421bf938683cf28aa43b3e939729947e1efe7cb
commit + 4d54e12d2156b98f4223c2a04e454632b484cbdb
blob - /dev/null
blob + a3a75596d444e0e8f8f8ac573fff05562e86c7ac (mode 644)
--- /dev/null
+++ LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 mtmn
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
blob - 4af396196520e8ce6be0adef854f26c2ba982be8
blob + 6a5d82393b30ad7de951655cc70027114c5d7a85
--- flake.lock
+++ flake.lock
@@ -1,7 +1,60 @@
 {
   "nodes": {
+    "elixir-overlay": {
+      "inputs": {
+        "flake-utils": "flake-utils",
+        "nixpkgs": "nixpkgs"
+      },
+      "locked": {
+        "lastModified": 1777038236,
+        "narHash": "sha256-zjstrj6cEO9jATzTWfgiClrW4yiC9rImsiwQnfCEuKA=",
+        "owner": "zoedsoupe",
+        "repo": "elixir-overlay",
+        "rev": "aa12c745a8b19467fb691609b4c1d56b949472e6",
+        "type": "github"
+      },
+      "original": {
+        "owner": "zoedsoupe",
+        "repo": "elixir-overlay",
+        "type": "github"
+      }
+    },
+    "flake-utils": {
+      "inputs": {
+        "systems": "systems"
+      },
+      "locked": {
+        "lastModified": 1731533236,
+        "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
     "nixpkgs": {
       "locked": {
+        "lastModified": 1761516808,
+        "narHash": "sha256-4ZdXt+vhA+qyE/TNCp16v2sBJyr0pteKqgiLTXxM4eU=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "2ab7841f414ccdefea889707b2d5e4b32cda9729",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-25.05-small",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "nixpkgs_2": {
+      "locked": {
         "lastModified": 1778124196,
         "narHash": "sha256-pYEytCNic/czazbV9r3tbQ6BZzqRBg/41x2dIC5ymOo=",
         "owner": "NixOS",
@@ -18,8 +71,24 @@
     },
     "root": {
       "inputs": {
-        "nixpkgs": "nixpkgs"
+        "elixir-overlay": "elixir-overlay",
+        "nixpkgs": "nixpkgs_2"
       }
+    },
+    "systems": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
     }
   },
   "root": "root",
blob - ef0b5ad3bfc222a9fff8740d4935f52bb89fee27
blob + 0dce136729be9a3274753177cf5118e9f52b50df
--- flake.nix
+++ flake.nix
@@ -1,16 +1,28 @@
 {
-  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
+  inputs = {
+    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
+    elixir-overlay.url = "github:zoedsoupe/elixir-overlay";
+  };
 
-  outputs = {nixpkgs, ...}: {
+  outputs = {
+    nixpkgs,
+    elixir-overlay,
+    ...
+  }: let
+    version = "0.0.1";
+  in {
     packages = nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"] (system: let
-      pkgs = nixpkgs.legacyPackages.${system};
+      pkgs = import nixpkgs {
+        inherit system;
+        overlays = [elixir-overlay.overlays.default];
+      };
     in {
       default = pkgs.beamPackages.mixRelease {
         pname = "shortener";
-        version = "0.0.1";
+        inherit version;
         src = ./.;
 
-        nativeBuildInputs = [pkgs.beamPackages.elixir_1_18];
+        nativeBuildInputs = [pkgs.elixir-bin."1.18.4"];
 
         MIX_HOME = "nix-mix";
         HEX_HOME = "nix-hex";
@@ -18,7 +30,7 @@
 
         mixFodDeps = pkgs.beamPackages.fetchMixDeps {
           pname = "shortener-deps";
-          version = "0.0.1";
+          inherit version;
           src = ./.;
           sha256 = "sha256-U/tNP3s7b4bBUrQx5l4VtDHpV9DsWj6zBYj8jsM4Acw=";
         };
blob - a19044bb26872c4fd68183c0d350cdeb28693025
blob + 16c33ad25e7a5f58923f47d3c0840ed852782823
--- hack/release
+++ hack/release
@@ -33,11 +33,11 @@ fi
 
 echo "releasing -> v$next"
 
-# --- update Cargo.toml ---
+# --- update versions ---
 
-sed -i "s/^version = .*/version = \"$next\"/" Cargo.toml
-cargo generate-lockfile
-git add Cargo.toml Cargo.lock
+sed -i "s/version: \"[^\"]*\"/version: \"$next\"/" mix.exs
+sed -i "s/version = \"[^\"]*\";/version = \"$next\";/" flake.nix
+git add mix.exs flake.nix
 
 # --- changelog ---