Compare commits

...

2 Commits

Author SHA1 Message Date
Agatha Lovelace 5285c4cfe2
Release 0.2.0 2024-01-08 21:39:06 +01:00
Agatha Lovelace 42b4582092
Update CI; Clean up flake.nix 2024-01-08 21:35:03 +01:00
4 changed files with 23 additions and 13 deletions

View File

@ -1,19 +1,29 @@
name: "Build legacy Nix package on Ubuntu" on: push
name: "Build Nix package on Ubuntu"
on: env:
push: RUSTFLAGS: "-Dwarnings"
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: cachix/install-nix-action@v12 - uses: cachix/install-nix-action@v23
- name: Building package - name: Building package
run: nix-build . -A defaultPackage.x86_64-linux run: nix build
- name: Get repository name
run: echo "REPO_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
- name: Get commit hash - name: Get commit hash
run: echo "COMMIT_HASH=${GITHUB_SHA::6}" >> $GITHUB_ENV run: echo "COMMIT_HASH=${GITHUB_SHA::6}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: url-eater-${{ env.COMMIT_HASH }}-x86_64-linux name: ${{ env.REPO_NAME }}-${{ env.COMMIT_HASH }}-x86_64-linux
path: result/bin/url-eater path: result/bin/${{ env.REPO_NAME }}
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- name: Lint
run: nix develop --command cargo clippy --all-targets --all-features

2
Cargo.lock generated
View File

@ -1123,7 +1123,7 @@ dependencies = [
[[package]] [[package]]
name = "url-eater" name = "url-eater"
version = "0.1.1" version = "0.2.0"
dependencies = [ dependencies = [
"arboard", "arboard",
"knuffel", "knuffel",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "url-eater" name = "url-eater"
version = "0.1.1" version = "0.2.0"
edition = "2021" edition = "2021"
authors = ["Agatha V. Lovelace <agatha@technogothic.net>"] authors = ["Agatha V. Lovelace <agatha@technogothic.net>"]
description = "Strip unneeded parameters from URLs copied to clipboard" description = "Strip unneeded parameters from URLs copied to clipboard"

View File

@ -11,8 +11,8 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
naersk-lib = pkgs.callPackage naersk { }; naersk-lib = pkgs.callPackage naersk { };
in { in {
defaultPackage = naersk-lib.buildPackage ./.; packages.default = naersk-lib.buildPackage ./.;
devShell = with pkgs; devShells.default = with pkgs;
mkShell { mkShell {
buildInputs = [ buildInputs = [
cargo cargo
@ -25,7 +25,7 @@
RUST_SRC_PATH = rustPlatform.rustLibSrc; RUST_SRC_PATH = rustPlatform.rustLibSrc;
}; };
}) // { }) // {
nixosModule = { config, lib, pkgs, ... }: nixosModules.default = { config, lib, pkgs, ... }:
with lib; with lib;
let cfg = config.services.url-eater; let cfg = config.services.url-eater;
in { in {