nice clean recipes pear.dunkirk.sh
recipes
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 73 lines 1.7 kB view raw
1{ 2 description = "pear strip any recipe URL down to what matters"; 3 4 inputs = { 5 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 }; 7 8 outputs = 9 { 10 self, 11 nixpkgs, 12 }: 13 let 14 systems = [ 15 "x86_64-linux" 16 "aarch64-linux" 17 "aarch64-darwin" 18 "x86_64-darwin" 19 ]; 20 forAllSystems = nixpkgs.lib.genAttrs systems; 21 in 22 { 23 packages = forAllSystems (system: { 24 default = 25 let 26 pkgs = nixpkgs.legacyPackages.${system}; 27 in 28 pkgs.buildGoModule { 29 pname = "pear"; 30 version = "0.1.0"; 31 32 src = ./.; 33 34 vendorHash = "sha256-qnvBWpHLZZq0R8QEhDJeclVlHEbnru6v2RkPnKIGMAY="; 35 36 ldflags = [ 37 "-X main.gitHash=${self.rev or self.dirtyRev or "dev"}" 38 ]; 39 40 meta = with pkgs.lib; { 41 description = "Nice recipes strip any recipe URL down to what matters"; 42 homepage = "https://pear.dunkirk.sh"; 43 license = licenses.mit; 44 platforms = platforms.unix; 45 }; 46 }; 47 }); 48 49 apps = forAllSystems (system: { 50 default = { 51 type = "app"; 52 program = "${self.packages.${system}.default}/bin/pear"; 53 }; 54 }); 55 56 devShells = forAllSystems (system: { 57 default = 58 let 59 pkgs = nixpkgs.legacyPackages.${system}; 60 in 61 pkgs.mkShell { 62 packages = with pkgs; [ 63 go 64 sqlite 65 ]; 66 67 shellHook = '' 68 export DATABASE_URL="pear.db" 69 ''; 70 }; 71 }); 72 }; 73}